I am trying to update the File Privacy on Records field via Process Builder for multiple files associated with a custom object record. But unable to do so as this field was not available under ContentDocumentLink object. Is it possible to update this field via process builder? If not then I will try to update it via Trigger, but I am not sure in which object can I find this field.

enter image description here


It's ContentVersion object is what you need to update.

You can update records of this object via trigger, you will need to update the SharingPrivacy field of this object.

Update this field to N for Visible to Anyone With Record Access. This means the file is visible if the user has read access to the record

Update this field to P for Private on Records. This implies file is Private but can be shared with others selectively using the ContentDocumentLink records.

  • ShareType field is different than File Privacy on Records field. So this will not work in my case. – Akash Jan 4 at 5:55
  • @Akash Updated the answer! Content Version object and SharingPrivacy is the field that needs to be used. – Mohith Shrivastava Jan 4 at 6:00
  • Just in case if anyone is trying to implement the same can follow my approach. I have fetched the File Id's from ContentDocumentId field using associated record id from LinkedEntityId field on the ContentDocumentLink Object. And then updating the Content version's SharingPrivacy field to 'N' or 'P' for all the ContentDocumentId. – Akash Jan 4 at 6:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.