You need to sign in to do that
Don't have an account?

Access “Share via link” properties (and link) using apex
Hi All,
I have an attachment with "Anyone with link" sharing configuration. How can I retrieve (or construct) the actual sharing URL using the apex code?
E.g., I have an attachment with id: 069240000009bdU and ViewAll permissionsI. From UI (web) I can see that its URL is:
https://ap1.salesforce.com/sfc/p/90000000t55g/a/90000000Chhk/fZcNyce65hRkHRM95T0nhPrJUNHiJ47If6BLyK24ixY
How can I get this URL through Apexcode and update to custom field?
Thanks in Advance.
I have an attachment with "Anyone with link" sharing configuration. How can I retrieve (or construct) the actual sharing URL using the apex code?
E.g., I have an attachment with id: 069240000009bdU and ViewAll permissionsI. From UI (web) I can see that its URL is:
https://ap1.salesforce.com/sfc/p/90000000t55g/a/90000000Chhk/fZcNyce65hRkHRM95T0nhPrJUNHiJ47If6BLyK24ixY
How can I get this URL through Apexcode and update to custom field?
Thanks in Advance.
This link is stored in an object called "ContentDistribution".
You can use below query to get this information.
Select Id, DistributionPublicUrl FROM ContentDistribution WHERE ContentDocumentId = '069240000009bdU'.
If this resolves your issue, please mark it as solved.