How to get a chatter “sharing via link” URL?

How to get a chatter “sharing via link” URL which can be accessed by anyone inside or outside of your company?

This can be achieved from the field “DistributionPublicUrl” in “ContentDistribution” object.

Step1:  Get the document ID from the object  “ContentDocument”.

SELECT FileExtension,FileType,Id,IsArchived,IsDeleted,PublishStatus,
SharingOption,SharingPrivacy,Title FROM ContentDocument where Id = '0694D0000008Ub4QAE'

Step2: Pass the ContentDocumentId value to the object “ContentDistribution”.

SELECT ContentDocumentId, DistributionPublicUrl, Id FROM ContentDistribution
where ContentDocumentId = '0694D0000008Ub4QAE'

The field “DistributionPublicUrl” will contain the URL which can be shared via a link to SFDC users and non SFDC users.

0 Comments

Leave a Reply

CONTACT US

We're not around right now. But you can send us an email and we'll get back to you, asap.

Sending

About Us

Forcetalks is a Salesforce collaboration platform for coders & developers, geeks & nerds, consultants & business heads, admins & architects, managers & marketers and of course the business owners. A community where you can learn from, where you can contribute to. For you. For Salesforce. Read More...

Copyright 2019 Forcetalks. All Right Reserved.

Log in with your credentials

or    

Forgot your details?