afraIT Shorty-Time! Just want to share a little script on how to get the attachment url or the attachment filename of an list item in SharePoint 2013.
There is often the request, that someone wants to get the complete URL of an uploaded document, picture or whatever.
The script is pretty easy. The big point here is the requestUri. You have to select the Attachments and the AttachmentFiles. After that you can append the expand and select the AttachmentFiles.
Then you can show either the FilesName or the URL. You can see the alert’s which are commented out in line 19 and 20.