The sharing of records is very vital for the performance of an organization, so it is very important that you should understand the Salesforce sharing rules. Hence Salesforce sharing rules came into play when records and other data require to be shared among the employees or multiple users in an organization. Sharing the records using Salesforce therefore becomes the option to be used by the organization.
Rules are basically formulated to provide the additional access on records to the specific users via roles, public groups, profiles and particular users.
Some most preferred sharing ways
- Organization-Wide default
- Role hierarchy
- Sharing rules
Organization-Wide default: When whole Org.( no single group or single user) requires then this setting is applicable.
We have different types of OWD settings:
- Private: In this no one can see other data, that means Opportunity is set to private and if created one Opportunity in the Org. nobody can go through that record.
- Public Read/Write: In this everyone get access on every record with read and write record.
- Public full access: Everyone has access on every record with full access.
- Public Read/Write/Transfer: Everyone have access on every record and have right to read, write and transfer of records.
- Controlled by Parent: Basically enabled for child records but have full control to its master record.
From here you can create sharing rules for different objects.
Role Hierarchy: In this records can be shared on the basis of role hierarchy methods means if I create one Opportunity record then my manager will have access to that particular records. You can perform this task by following the steps –setup > security controls > sharing settings > edit > grant access.
Sharing Rules: We apply criteria based rules for sharing records with specified groups or roles.
Setup > security controls > sharing settings > sharing rules > click new > create.
We have two types of sharing rules:
Based on record owner: Here we decide which user’s records to whom to be shared and up to which level access will be provided like read only or read/write.
Based on criteria: By creating criteria with object’s fields, we can set the access path to whom it should be shared.
Now you can see both sharing rule (Based on record owner and Based on criteria)