Sharing attachments with a third party has always seemed unsafe. Salesforce prioritizes data security over everything else and we do too! So, instead, we created a Salesforce VisualForce page that can help you share the attachments with the concerned person without having to give access to it.
How?
It’s simple! The below-given steps will allow you to give access to the attachment to the third party on a public URL. All you need to do is generate an id of each attachment and share it with the concerned person which he/she will use in the URL to get access to it.
To See A Demo: Click here
It’s that easy! Let’s get into it.
Visualforce page code :-
Apex Controller code :-
Conclusion:
That’s how you can give access to the attachments using force.com sites. Do let us know if it helped you out or you have any questions regarding this. We would love to hear from you.
Happy Learning! 🙂