Skip to main content
We have a trigger upon insert of a Salesforce File, we are setting the ContentVersion.SharingOption = 'R'   //restricted

 

This is to restrict the file from being shared.  Upon doing a query of the ContentVersion record after the file is uploaded we can see that the SharingOption is set to 'R'

 

However, a user and other users are able to edit the sharing of the file.

 

Ultimately, we are trying to prevent a user that doesn't have Modify All rights the ability to edit the sharing of certain files.  

 

Per this documentation it seems that setting the SharingOption would accomplish what we are trying to accomplish.  

 

Please let us know what we are missing here and suggestions to resolve.

 

https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_contentversion.htm
2 answers
0/9000