Sharing Rules in Salesforce allows users to open up access to records based on record ownership (which is based on ownership) or specific criteria ( which is based on criteria) on a record such as a specific value. Sharing rules in Salesforce enables horizontal access to the records for users. Even before we dig into sharing rules, we need to understand the public groups. A public group is a set of users, subgroups, roles, along with the subordinates of the roles. We can check the existing public groups, by going to Setup, and then from the quick find box, look for public groups. We can also create new public groups from this option.
When you create a new group, you can add the new members to the new group. We can add users, groups, or even roles to the new public group. Once the public group is created, we can implement the sharing rules. Public groups make the creation of sharing rules much easier. This is considered as the best practice by the organizations, where the data is preserved for a longer span.
How to define Sharing Rules in Salesforce
By default, Salesforce includes all the users in one single public group. We can define the sharing rules in a few simple steps.
- Go to setup. From the quick find box, access “Sharing Settings”.
- Once the sharing settings options page opens up, you will have the option to select the object from the dropdown box, whose settings you want to manage For this example, let’s choose “Job Application”.
- Once you select the object, it will show OWD. We can check the sharing rule for each of the objects. These rules will be shown in the section, “Default Sharing Settings”.
- Review the sharing rule.
- Now go to the object area, and click on “New”, to create a new sharing rule.
- The name of the rule will automatically get populated as we click over it.
- To share the records, select a public group that has been already created, and can be chosen for the entire organization
- In the next step, prepare a list of users, with whom the details will be shared.
- Now select the level of access, along with Reading/Write permissions.
- Once you are done, click on “Save”.
The sharing rule has been successfully created now and can be implemented on the records associated with the object.