12

Document Set is an option. I had also used LinkToDocument as it can link to master document. You can also create a unique column (or field) so these can grouped together.


10

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 level . you can get the delete link for only the related files that attached directly for this event when editing this specific event. If the file attached for ...


9

How to retrieve attachment files using SPServices function getAttachmentFiles(listName,listItemId,complete) { $().SPServices({ operation: "GetAttachmentCollection", async: false, listName: listName, ID: listItemId, completefunc: function(xData, Status) { var attachmentFileUrls = []; $(...


8

You need to $select and $expand the AttachmentFiles property for your list items if you want to select many items from the list. _api/lists/getByTitle('MyList')/items?$select=AttachmentFiles,Title&$expand=AttachmentFiles Then you can get attachment info (if it exists) in the AttachmentFiles property of your list item which will be an array of ...


8

Using SharePoint 2010 JSOM i would suggest the following approach to retrieve list item attachments: determine whether List Item contains attachments or not via ListItem.Attachments property in case if list List Item contains attachments, submit a second request to retrieve attachment files Example function getListItemAttachments(listTitle,itemId,success,...


7

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 npm: npm I sp-pnp-js --save In your code, import sp-pnp-js, and refer to Web, List, and ItemAddResult import { Web, List, ItemAddResult } from "sp-pnp-js/lib/...


6

You can map a drive to the List: http://community.office365.com/en-us/forums/154/t/5216.aspx The attachments will be under the Attachments folder.


6

REST (with jQuery.ajax): $.ajax({ url: "/_api/lists/getByTitle('Test')/getItemById(1)/AttachmentFiles/getByFileName('test.txt')", method: 'DELETE', headers: { 'X-RequestDigest': $('#__REQUESTDIGEST').val() } }); You can see the REST API endpoints at http://msdn.microsoft.com/en-us/library/office/jj860569(v=office.15).aspx . And you can see ...


6

Not enough Reputation to add a comment, but DacrioS has cracked it. I have an on-premises install of Sharepoint 2013 and could not get attachments to show up when using _api/web REST interface. Until I read this comment: "Try adding Attachments to the select." Let me be clear: This Does Not Work _api/web/lists/getbytitle('MYLIST')/items?$filter=Id%20eq%...


5

Yes, here is the PowerShell Code: $web = Get-SPWeb -Identity http://sp2010:90 $list = $web.Lists["Resources"] foreach ($item in $list.Items) { $attachmentCollection = $item.Attachments $folder = $web.GetFolder($attachmentCollection.UrlPrefix); foreach ($file in $folder.Files) { Write-Host $item.Title Write-Host $file.Name ...


5

First of all, SP.ListItem.attachmentFiles property is not available in SharePoint 2010. The following REST query returns all attachments in a List in SharePoint 2010: http://<sitecollection>/<site>/_vti_bin/ListData.svc/Requests?$select=Attachments&$expand=Attachments


5

Most probably the error File not found occurs since you are trying to retrieve attachments folder that not yet exist in method HasListItemAttachment The following example demonstrates how to upload attachment file via SharePoint JSOM: function processUpload(fileInput, listTitle, itemId,success,error) { var reader = new FileReader(); reader.onload = ...


5

JSOM var listTitle = 'Tasks' var itemId = 1; var fileName = 'Instruction.docx'; var ctx = SP.ClientContext.get_current(); var list = ctx.get_web().get_lists().getByTitle(listTitle); var item = list.getItemById(itemId); var attachmentFile = item.get_attachmentFiles().getByFileName(fileName); attachmentFile.deleteObject(); ctx.executeQueryAsync( function()...


5

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 || document.write('<script src="//ajax.aspnetcdn.com/ajax/jquery/jquery-1.10.0.min.js"><\/script>')); var linkFieldContext = {}; ...


4

You can add this script: <script type="text/javascript" language="javascript"> function PreSaveAction() { var elm = document.getElementById("idAttachmentsTable"); if (elm == null || elm.rows.length == 0) { document.getElementById("idAttachmentsRow").style.display='none'; alert("Please attach Documents"); return ...


4

Use SP.ListItem.attachmentFiles to retrieve the collection of attachments that are associated with the list item. How to retrieve list items with attachments using JSOM function getListItems(listTitle,success,error) { var ctx = SP.ClientContext.get_current(); var web = ctx.get_web(); var list = web.get_lists().getByTitle(listTitle); var items ...


4

One drawback that SharePoint lists have is that attachments are not versioned along with other changes to a list item when list versioning is enabled. If you want, you can create custom application for it.We need to attach receivers to the ItemAdding, ItemUpdating, ItemAttachmentAdding and ItemAttachmentDeleting methods. These will be used to push the ...


4

If you get a message like: The 'Attachments' column doesn't exists. Try adding 'Attachments' to the select, like: _api/lists/getByTitle('MyList')/items?$select=Attachment,AttachmentFiles,Title&$expand=AttachmentFiles


4

You can try by using Infopath. Please try steps given below: On the List tab of the ribbon, Click Customize form To make the attachment field required, we will add a dummy textbox control that will contain the required rule. To do this, add a textbox control and place it before the attachment field Right click on the textbox control, hover on ‘Rules’ and ...


4

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(function(){ $("table#idAttachmentsTable a").attr('onclick', '').click(function (event) { event.preventDefault(); var url=$(this).attr('...


4

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"> tag and include this css there. This is how it should look like after your change (tested on new form on custom list): <SharePoint:StyleBlock runat="...


3

I know this is an old thread, but there are free codeplex solutions that will do what you are asking. http://SharePointStuff.Codeplex.com adds a new activity to SharePoint Designer that allows you to send an email with an attachment. If used on a list item it will send any documents attached to the item or if used on a document library it will send the ...


3

If you don't want to go down the document set approach, you could create a lookup column to either a Supporting Files document library or the current document library itself that allows for multiple selections. This would allow you to add additional related documents to the metadata for the "Main" document.


3

I have found a way to export attachments from Microsoft Office Sharepoint Designer 2007. Once connected to my list, right-click and select "Publish Selected Files...". From there I chose the "File System" option. This writes all my attachments to disk within individual folders id'ed by list item ids. As for the lists themselves, those I just exported to ...


3

The Question contains a workable solution to make List Attachments clickable. But it isn't feasible when loading dozens of columns and rows, the performance is noticeably affected. Instead, the link should be generated on demand, when the user clicks. Here is a modification on the above code to make it work. This shaved about 3.5 seconds of my loading and ...


3

Since you don't need to use the SPServices library, you can accomplish this via REST and the moveTo() method. The following should work: var url = "/_api/Web/Lists/getByTitle('My List Name')/Items", qs = "?$filter=Attachments eq 1&$select=ID,Author/Title,*&$expand=Author"; $.ajax( { url : siteUrl + url + qs, type : 'GET', headers : { ...


3

You can get attachments using var url = url + "/_api/web/lists/getbytitle('ListTitle')/items(1)/AttachmentFiles"; $.ajax({ url: url, accepts: { json: "application/json;odata=verbose" }, method: "GET", success: onQuerySuccess, error: onQueryError }); function onQuerySuccess(data) { if (data) { $.each(data.d....


3

Here you go. If you have questions about what the script actually does, just add them as comments. Obviously you would need to tweak it for your uses. It would be better to use variables for the site URL, path, and the file name to match on. $gc = start-spassignment $web = ($gc | Get-SPWeb "https://portal.domain.com") $list = $web.Lists["Tasks"] #Use CAML ...


3

Use below REST API example url: "<app web url>/_api/SP.AppContextSite(@target)/web /getfilebyserverrelativeurl('/Shared Documents/filename.docx')/Length For more info: MSDN


3

You are getting this error since attachments are not included via query (view fields). Attachments column is not the same as AttachmentFiles property, first one only returns status whether attachments are included or not, while the second returns attachments info. Since your goal is to retrieve a specific set of fields plus attachments included, you could ...


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