In Salesforce, creating Scoping Rules allows us to control the records that users see based on the criteria that we have defined in the Scoping Rule.
In this Salesforce tutorial, I will explain how to Create Scoping Rule in Salesforce. In that, we will see What the scoping rules are in Salesforce and how to create them.
The feature of creating a scoping rule is possible only in Salesforce Lightning.
What are Scoping Rules in Salesforce?
In Salesforce, Scoping rules let us control the records that our users see based on criteria that we select. We can set up scoping rules for different users in your Salesforce org so that users can focus on the records that matter to them.
Scoping rules are available for Accounts, Cases, Contacts, Leads, Events, Tasks, Opportunities, and Custom Objects.
Scoping rules are flexible, and we can enable and disable them on a query basis. Scoping Rules don’t restrict the user’s access to records. Users can still open all the records they can access according to the Organization’s Sharing Settings.
Create a Scoping Rule in Salesforce Lightning
To create a scoping rule in Salesforce Lightning, navigate to the Setup page of Salesforce Lightning and follow the below steps.
1. On the Setup, click on the Object Manager tab. Then select the object on which you want to create a Scoping Rule. Here, I have selected the Opportunity.

2. On the setup page of the object, go to the left-hand sidebar, then select Scoping Rule.

3. In the scoping rule setup window, click on the New Rule button to create a scoping rule for the object.

4. In this step, specify the Rule details by entering the fields Rule Name and Full Name.
In this example, I have entered the Rule Name as Split Opportunites and the field Full Name will be auto-filled according to the entered Rule Name.
The Full Name is the name of the component used by the API.

5. After entering the above fields, click on the Is Active checkbox to activate this scoping rule.

6. In the User Criteria section, we have to select which users this scoping rule applies to, by entering the Field, Operator, Type, and Value.
In this example, I have specified the Field as User alias, Operator as Equals, Type as String, and Value as “asing“(user alias name).

7. In the section Record Criteria, we have to select the records that specified users are allowed to see.
Here, we have to specify the fields Field, Operator, Type, and Value.
In this example, I have selected the Field as Opportunity.IsSplit, Operator as Equals, Type as String, and Value as True, which means that the user will able to see the Opportunity records with split opportunities in this scoping rule.

8. At last, click on the Save button.
As we click on the Save button the scoping rule will be created in the selected object.

In this way, we can create a Scoping rule for an object in Salesforce Lightning, and you can follow the same procedure to create a scoping rule for any other object.
Conclusion
In this Salesforce, we have learned to Create a Scoping Rule in Salesforce, with the help of the above example, we have successfully created a scoping rule in Salesforce Lightning for the Opportunity Object by specifying the criteria for the Records and Users.
Along with this, we also learned about the Scoping rule in Salesforce and its uses for implementing it in the org.
You may like to read:
- How to Create Owner-Based Sharing Rules in Salesforce
- How to Create Restriction Rules in Salesforce
- Sharing Rules in Salesforce
I am Bijay Kumar, the founder of SalesforceFAQs.com. Having over 10 years of experience working in salesforce technologies for clients across the world (Canada, Australia, United States, United Kingdom, New Zealand, etc.). I am a certified salesforce administrator and expert with experience in developing salesforce applications and projects. My goal is to make it easy for people to learn and use salesforce technologies by providing simple and easy-to-understand solutions. Check out the complete profile on About us.