How to Create Scoping Rule in Salesforce

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 you can create a Scoping Rule for the objects in your org.

The feature of creating a scoping rule is possible in Salesforce Lightning only, sadly you won’t be able to create a scoping rule in Salesforce Classic.

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 custom objects and the account, case, contact, event, lead, opportunity, and task standard 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 that 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 page of Salesforce Lightning, click on the Object Manager tab.

2. In the Object Manager tab select the object in which you have to create a Scoping rule. In this example, I have selected the Opportunity object to create a scoping rule.

Create a Scoping rule in Salesforce

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

Salesforce Lightning Create a Scoping rule

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

Create a New Scoping rule in Salesforce

5. In this step, specify the Rule details by entering the fields Rule Name and Full Name.

See also  How to Convert Lead to Opportunity in Salesforce

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.

Specify Rule detail for Scoping Rule in Salesforce

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

Activate the Scoping rule in Salesforce Lightning

7. 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).

Specify User Criteria for Scoping Rule in Salesforce

8. 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.

Define Record Criteria For Scoping Rule in Salesforce

9. At last click on the Save button.

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

Create a Scoping rule in Salesforce Lightning

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.

See also  How to Enable Omni Channel in Salesforce

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: