Sharing Rules in Salesforce
Chapter Topics
- Data Security and Level of Data Access in Salesforce
- User Management (Control Access to the Organization)
- Managing Salesforce Password Policies (Control Access to Organization)
- Restrict Login Access by IP Address in Salesforce
- Restrict Login Access by Time
- Object Level Security in Salesforce
- Permission Sets in Salesforce
- Field Level Security in Salesforce
- Record Level Security in Salesforce
- Organization Wide Default (OWD) in Salesforce
- Role Hierarchy And Public Group In Salesforce
- Sharing Rules in Salesforce
- Manual Sharing in Salesforce
In Salesforce, sharing rules are like access control mechanisms for your data. They determine who can see, edit, or delete specific records beyond what’s granted by the organization-wide defaults (OWD).
These rules aim to give access to records based on pre-defined criteria. Sharing rules are most valuable when OWDs are set to private or public read-only, as they can extend access without restricting it.
Let’s see what they are and how to implement them in your Salesforce org.
What is Sharing Rules in Salesforce?
Sharing rules in Salesforce creates automatic exceptions to the Organization-Wide Default settings for the users who do not own the record.
They should be applied to the objects whose org-wide defaults are set to Public Read-only or Private because sharing rules can only extend the access; they cannot restrict the access provided by Organization-wide defaults.
Types Of Sharing Rules In Salesforce
There are two types of Sharing Rules in Salesforce. Based on the sharing settings in Salesforce, we decided which records are to be shared:
1. Owner-Based Sharing Rules
The owner shares the records owned by specific users. Owners can be identified through public groups, roles, and subordinates, and the records are shared with a defined set of users needing access.
2. Criteria-Based Sharing Rules
Criteria-based shares the records that meet specific criteria on field-based conditions, no matter who owns the record. This is useful when access needs to be identified as per the nature of the record rather than its ownership.
Parameters to Create Sharing Rules in Salesforce
Before creating sharing rules, administrators need to answer these three questions:
1. Which records to share – This identifies the records that need to be shared. They can be categorized based on the records’ owner or the criteria they meet.
2. With whom the records are shared – Records can be shared with public groups, roles, and subordinates.
3. What level of access is provided – The users with whom the records are shared should have Read-Only or Read/Write access, as decided by this question.
How to Create Sharing Rules in Salesforce?
Here is how you can create owner-based sharing rules in Salesforce.
- Confirm that the appropriate groups have been created if you plan to include public groups in your sharing rule.
- From Setup, enter Sharing Settings in the Quick Find box, then select Sharing Settings.
- In the Sharing Rules related list for the object, click New.
- Enter the label name and rule name. The label name appears on the user interface. The rule name is a unique name used by the API and managed packages.
- Optionally, enter a description of the sharing rule, up to 1,000 characters.
- For the rule type, select Based on record owner.
- Specify which users’ records are shared. For owned by members, select a category from the first dropdown list and a set of users from the second dropdown list or the lookup field.
- Specify the users who get access to the data. For Share with, select a category from the first dropdown list and a set of users from the second dropdown list or the lookup field.
- Select sharing access settings for users.
- Read Only
- Read/Write
- Full Access (Only for manual sharing)
- Click Save.

Things to Keep in Mind
Role hierarchy grants access to managers of records that their subordinates hold. Using sharing rules in Salesforce, one can extend access to different roles or departments.
As they cannot restrict access, it gives Read-Only and Read/Write as access parameters in sharing rules.
They work best when they are defined for a particular group of users that can be determined or predicted in advance, rather than a set of users that frequently changes.
Salesforce allows a maximum of 300 Sharing Rules per object, with around 50 criteria-based sharing rules. Ensure to plan the sharing strategy accordingly.
Next TopicNeed more support?
Get a head start with our FREE study notes!
Learn more and get all the answers you need at zero cost. Improve your skills using our detailed notes prepared by industry experts to help you excel.