I need to get filenames and their URL's from related items of list item (it is the Tasks list in PWA). How can i do that using REST API? The AttachmentFiles field is empty.

On the XHR tab of Chrome debugger i can see the ProcessQuery that returns data i need, but i can't understand how to request it. The preview looks like this:

[{ObjectType: "SP.RelatedItem", IconUrl: "icxls.png", ItemId: 1,…},…] 0: {ObjectType: "SP.RelatedItem", IconUrl: "icxls.png", ItemId: 1,…} IconUrl:"icxls.png" ItemId:1 ListId:"5277b158-c82a-4170-9075-9463b9a8d94c" Title:"download (1).xls" Url:"/PWA/Teasty/Shared Documents/download (1).xls" WebId:"549eacee-64cf-4614-b90a-12112e6d3feb"

I can get the data from the document library where the documents are stored but there is no link between documents and tasks.

Can anyone help me please?


I think I found the answer. First of all I switched on the RelatedItems field like shown here: https://en.share-gate.com/blog/new-sharepoint-2013-column-related-items Then I used ListId to get list items from the list and then filename and URL I've got from the EncodedAbsUrl and LinkFilename fields.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.