IT Hub

Sharing Rules in Salesforce: A Complete Guide on Types and Implementation

Reco Security Experts
April 19, 2024
May 2, 2024
4 min read

Data security and access are not just important; they are crucial aspects of Salesforce administration. When granting access to data, it is vital to ensure that only the right people can see important information in your organization. This is where Sharing Rules come into play. They are a powerful tool that empowers you, as a Salesforce administrator, to take control and manage data access effectively.

Here's a Little Scenario for More Clarity

Anthony is the Sales Manager for his company. He manages two teams—one in the U.S. and one in Spain. As the Sales Manager, he can access the two teams' records because of the functionalities of Role Hierarchy in Salesforce. However, what happens when the team in Spain needs to access the records of the U.S. team? Well, there's just one easy answer - Sharing Rules!

What are Sharing Rules?

With Sharing Rules, you can grant access to your records to users in roles, territories and public groups, even outside the Organization-Wide Default (O.W.D). Sharing rules allow an administrator to share records with users who do not have access to the record. There are three main components in Sharing Rules in Salesforce - records that need to be shared, who they will be shared with, and the level of access to be granted upon sharing. Let’s get into more detail!

How to Access the Sharing Rules Feature

  1. Type “Sharing” in the Quick Find box under Setup.
  2. Click “Sharing Settings” as shown in the image.
  3. Scroll down, and you will find various objects you can create by sharing rules for them.

Still don’t understand? No worries—we will look into this in detail soon. Read on!

Types of Sharing Rules

In Salesforce, there are two major types of Sharing Rules:

  • Owner-Based Sharing Rule
  • Criteria-Based Sharing Rule

Owner-Based Sharing Rules

Owner-Based Sharing Rule is a simple way to share records from one user or group of users to another user or group. Remember our scenario at the beginning of this article? Imagine a record owner in the U.S. who wants to share a record with a member of the team in Spain. All they need to do is use the owner-based sharing rule to share the records.

Implementing Owner-Based Sharing Rules

  1. Check your Sharing Rule type, which in this case will be the “Based on record owner” (1)
  2. Next, select which records to be shared (2)
  3. The third step is to choose the users to share with (3)
  4. And finally, select the level of access for the users you want to share the records with (4)

Criteria-Based Sharing Rules

Criteria-based sharing rules are as simple as they sound—sharing is based on meeting certain criteria. To create the criteria, you need three elements:

  1. The field (1)
  2. The operator (2)
  3. The value (3)
  4. Select the user or group to share with, and state the level of access you want them to have (4)

Let’s go back to our scenario - A team member in the U.S. wants to share their records with their counterpart in Spain, but only if a client has been contacted. In other words, record xxx should only be shared if the “Client Contacted” field is set to “Yes.” Using this example:

  • Field = Client Contacted
  • Operator = Equals
  • Value = Yes

Next, select the users you want to share with and their level of access, and you're done! 

Check Out This Video Demo to Learn More About Sharing Rules in Salesforce

Key Points to Note

  • Sharing Rules in Salesforce are available in Professional Edition, Enterprise Edition, Performance/Unlimited Edition, and Developer Edition.
  • The default limit for sharing rules per object is 300. You can only create up to 300 sharing rules per object. A support case can increase this limit to a maximum of 500.
  • The default limit for Criteria-Based sharing rules is 50.

Creating a Sharing Rule in Salesforce is a straightforward process that can make data access easier.

Best Practices for Handling Salesforce Sharing Rules

  • Sharing rules are only used to grant wider access. You cannot use sharing rules to give restrictions lower than those in the Organization-Wide Default (O.W.D.).
  • You can create sharing rules for custom and standard objects.
  • The “Grant Access Using Hierarchies” works for sharing rules too. Users above in the role hierarchy can access sharing rules activated on users below them in the role hierarchy.

Explore More
See more articles from our Hub