Skip to main content
Share Your Experience: Take the 2024 Developer Survey
10 votes
Accepted

Missing delete attachments button

It's a normal behavior with the recurrence events when you try to edit a specific one event in the Event series ! So you should be aware of the following : If the file attached for a specific event ...
Mohamed El-Qassas MVP's user avatar
7 votes

How to resolve "The property or field 'ListItemCollectionPosition' has not been initialized.." error?

You can include it like below. clientContext.Load(listItems,items => items.Include(item => item.Id), items => items.ListItemCollectionPosition);
user64384's user avatar
7 votes
Accepted

SPFX: How to add item in SharePoint list with attachment?

Ronak, Working with attachments can be frustrating, but I have found that using the awesome PnP library makes it easy. Here's a quick summary of how to do it: Install the sp-pnp-js library by using ...
Hugo Bernier's user avatar
  • 1,236
6 votes
Accepted

Is there a way to show the actual Attachment links inside the list view for my custom list

Option 1 - not sure why its showing error, works at my end. Could be something to do with jquery loading issue. You can the below jsLink to show the attachments: (function () { (window.jQuery ...
Gautam Sheth's user avatar
  • 30.9k
4 votes
Accepted

Open attachments in new tab issue

Just resolved my issue. I referred to this question's answer and added .attr('onclick', '') This clears the onclick attribute in the html. So my code now looks like this: $(document).ready(...
Gintas K's user avatar
  • 1,237
4 votes
Accepted

Remove the option to delete attachment on Edit Form

You can do it with this piece of css: .ms-delAttachments { display: none; } You can open the edit form in the Advanced mode in SharePoint designer, find the <SharePoint:StyleBlock runat="server"&...
Damjan Tomic's user avatar
  • 3,656
3 votes

Linking from List Item to Multiple Documents in SharePoint Online

The approach with separate document library is definitely better than the one with attachments. You should create a document library, enable content types (Document library settings -> advanced ...
Damjan Tomic's user avatar
  • 3,656
3 votes
Accepted

Where does SharePoint store attachments?

Items which is deleted from SharePoint list,libraries are not deleted permanently. It will goes to recycle bin. deleted items/Attachments will goes to "Recycle Bin" of site collection. You can view,...
SP Developer's user avatar
  • 3,085
3 votes
Accepted

Handle ListItem attachments via CSOM

Please use below code: foreach (AttachmentFile file in data.NewAttachments) { var attInfo = new AttachmentCreationInformation(); attInfo.FileName = "Name"; attInfo.ContentStream = new ...
Samir Khimani's user avatar
3 votes
Accepted

Getting error of 'Column 'Attachments' does not exist. It may have been deleted by another user.' when calling REST API

Looks like you are missing the Attachments column in the API. Try it as below: http://<SITE>/_api/web/lists/getbytitle('Narrative%20Framewo‌​‌​rk')/items ?$select‌​=Lookup1/Title,Looku‌​p2/...
Gautam Sheth's user avatar
  • 30.9k
3 votes

Placing a hyperlink (to click on) for an attachment in list view

Please follow these steps to display attachments in new column. Create a Multiple lines of text with rich text option column. Example I have created ‘ItemAttachments’. Reason of creating it as ...
Saira's user avatar
  • 608
3 votes

Upload Attachment field to SharePoint

Following is jQuery example of attaching file via REST <input type="file" id="fileUpload1" /> <input type="submit" id="buttonClick" onClick="buttonSubmitClick()" /> <script type="...
Arsalan Adam Khatri's user avatar
3 votes
Accepted

add attachments with javascript on item edit

You can create a custom File Upload control <input id="file_input" type="file"> (if you want to upload multiple files, use "jquery.multifile.js" plugin). Get files from the custom control and ...
JoannaW_MSFT's user avatar
  • 6,621
3 votes
Accepted

Copy attachments from list to another list

You can do it with following code: foreach ($AttachName in $item.Attachments) { $spFile = $item.ParentList.ParentWeb.GetFile($item.Attachments.UrlPrefix + $AttachName); $newItem.Attachments....
Damjan Tomic's user avatar
  • 3,656
3 votes
Accepted

Convert SharePoint file object into hex string

Found an answer for this. I need this to send attachment from SharePoint list item to SQL in varbinary(MAX) field. Converted file into ByteArray and then converted it to string $fileInfo = [Microsoft....
Bhaskar Dhone's user avatar
2 votes

Mandatory File Attachmant

Instead of a list, why not use a library? They wouldn't be able to get started without a document, and a library still supports metadata fields. No code or other customizations would be needed.
Mike2500's user avatar
  • 8,060
2 votes

Try get attachments to SPList

Once you intance the item, loop within attachments collection. Sample code: SPAttachmentCollection attachments = listItem.Attachments; foreach (string attachment in attachments) { string t = ...
Juan Pablo Pussacq Laborde's user avatar
2 votes
Accepted

How to attach a document from a SharePoint library into a list item?

You can use SharePoint Column type "Publishing Hyperlink" and you can directly provide provision to user to upload attachments from SharePoint Itself. Publishing must be enabled by a site collection ...
Ankitkumar Malde's user avatar
2 votes
Accepted

List Attachment

For each item SharePoint creates folders for storing attachments. The URL format is http://weburl/Lists/<listname>/Attachments/<listItemID> You can also check it with the REST-URL: ...
Amal Hashim's user avatar
  • 28.3k
2 votes

Add Attachment File Button in Library Form Sharepoint 2013

This link might be able to help you. <script type="text/javascript"> function AttachFile() { SP.Ribbon.PageManager.get_instance().executeRootCommand("Ribbon.ListForm.Edit.Actions....
Rohith Nair's user avatar
2 votes

how to copy data over with attachments to a new list

One way is to create your filtered view on your source list. Then go to Site Settings and click on Content and Structure. This will take you to a screen with a hierarchy of your site. Click on your ...
Eric Alexander's user avatar
2 votes

Unable to view word documents and excel sheet attachments in SharePoint Online

I have not tested older versions of word or excel. However, I would suggest to activate the (Open Documents in Client Applications by Default) feature. Providing that the users have office suite ...
Ahmed Mahmoud's user avatar
2 votes
Accepted

New item saving sometimes hangs when there is an attachment

I've had this problem and it was because the site isn't in the trusted sites list in the IE options. IE Options -> Security -> Trusted Sites -> Add site to trusted sites.
Mike's user avatar
  • 12.2k
2 votes
Accepted

Get attachments hyperlink from a list

You can use the below REST API endpoint: /_api/lists/getByTitle('Test')/items?$select=Title,AttachmentFiles&$expand=AttachmentFiles The full code would be somewhat as below using REST API: $....
Gautam Sheth's user avatar
  • 30.9k
2 votes
Accepted

SP2013 - export custom list attachments with power shell

Refer How to use PowerShell to download attachments Also this Question has some details for the same.
John Zachariah's user avatar
2 votes

Linking from List Item to Multiple Documents in SharePoint Online

Depending on your specific requirements, it sounds you could simply create a lookup column (allow multiple selections) on your employee list. The lookup column source would be your training documents ...
Ornery Walrus's user avatar
2 votes

Handle ListItem attachments via CSOM

Thanks to @Samir Khimani for the help, however the deleting of the attachments does not always work since it modifies the current iteration. I edited a little bit his answer followings: bool update = ...
Emaborsa's user avatar
  • 1,189
2 votes

Several attach field on a form

You can create your own file control in HTML and use below script. //Enable Multiple Upload Script $('.attachmentButton').change(function(event){ //alert("change"); //startUpload(self, function ...
Hardik's user avatar
  • 7,733
2 votes
Accepted

How to save image as attachment in List using CSOM C#?

I have used this in PowrShell Scripts May be it will help you foreach($item in $Items) { if($item.Attachments -ne $null) { try { foreach($attachment in $item.Attachments) { ...
Akshay Dattatray Nangare's user avatar
2 votes

How to save image as attachment in List using CSOM C#?

There 2 ways you can add attachments to list items. Option 1 - .AttachmentFiles.Add(attachmentInfo) as below using FileStream: var list = context.Web.Lists.GetByTitle("CustomList"); var listItem = ...
Gautam Sheth's user avatar
  • 30.9k

Only top scored, non community-wiki answers of a minimum length are eligible