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
ssuede7ssuede7 

Download Attachments

Can anyone provide some sample code showing how to retrieve an attachment from salesforce and make it accessible via a webpage link to a client.

 

Thanks

DevAngelDevAngel

Hi ssuede7,

Is that the best approach, or do you just want the linke to the attachment?

SimplySfdcSimplySfdc

Hi, I would the links of the file to download preferably in .NET. Thanks

sq

DevAngelDevAngel

Hi sq,

The link to the attachment detail page looks like this:

https://na1-api.salesforce.com/00P30000000kDCz

If you put your mouse over the "Click here to view this file" link you will see a url like this:

https://na1-api.salesforce.com/servlet/servlet.FileDownload?file=00P30000000kDCz

This is the direct link to download the attachment.