Posts

Showing posts with the label sharing

Salesforce Fact #621 | Restrict owner update in case of manual sharing records

Image
In context of the last post, suppose we want to put a validation that if the account records have existing manual sharing records then the owner cannot be changed. We can implement the same using trigger logic. Attached is the screenshot. Note: The code snippet is only for demonstration purpose and coding best practices have not been covered.

Salesforce Fact #562 | File sharing restriction

Image
There is an option in ContentVersion object to restrict the sharing and unsharing of files. A picklist field named ' Prevent others from sharing and unsharing ' can be set to impose the restriction. The picklist has two values: Freeze Sharing Off, Freeze Sharing On. If  Freeze Sharing On is selected, the file once shared with some users or groups, they cannot share or unshare it further. However, frozen files can still be shared by system admins and file owners, if they have collaborator access to the file. Reference:  https://help.salesforce.com/s/articleView?id=sf.collab_files_freeze_sharing.htm&type=5 https://help.salesforce.com/s/articleView?id=sf.collab_files_freeze_sharing.htm&type=5 Attached are the screenshots.