function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Jan AertgeertsJan Aertgeerts 

Download attachment link(s) in view

Is it possible to show the direct download links (e.g. Attachment 1, Attachment 2) of attachments on a view?
I have an invoice object where the original invoice (pdf) is uploaded. But to make it easier to get an overview it would be useful to have a button/link on the list view of all invoices to get the document directly instead of opening the invoice, clicking on the attachment(s) and click view file for every invoice.

Can someone help me along on how to implement this, or tell me if this is possible?
I'm having trouble accessing the attachments from the object via code.
Boom dev9xBoom dev9x
You can use this simple formula field on you Invoice object.

- Create a new formula field and use the formula below:

HYPERLINK('ui/content/ViewAllNotesPage?id='+Id+'&retURL=listviewId', 
'Attachments list', '_self')

Please replace the listviewId with the Id of the list view that you put this new formula on (i.e. 001?fcf=00Bj0000002ahXX ---> this is the id of "My Accounts" list view in my dev org), so it will return to the list view when you click cancel on the Notes and Attachments page.

- Then put the new formula field in one of your list view columns.

Good luck!