Release Spring 22
What is Restriction Rule?
Restriction rule is another Data Security tool which applies to restrict the data visibility. It’s an unique because this is the only way an admin can decrease data visibility in Salesforce.
Where Can it be applied?
- List Views
- Lookups
- Related Lists
- Reports
- Search
- SOQL
- SOSL
Scenarios for using Restriction rule
- It can simplify controlling access to records with sensitive or confidential information. Example, Offshore agents should not see Cases with confidential checkbox checked.
- Some specific events/tasks can only be viewed by certain users. For example North American User only can view event related to NA.
How it works?
When a restriction rule is applied to a user, the data that they had read access to via sharing settings (OWD, Role Hierarchy, Sharing Rule, Manual Sharing) is further scoped to only records matching the recordFilter. Record filter is a criteria which is based on the User attribute and Record attribute.

For example, In Below table, although both User 1 and User 2 have read access to all three accounts (OWD public) , after the rule applied, User 1 can able to see only Account 1 and Account 2.

How to Configure Restriction Rule
- In Object Manager, click the object name for the restriction rule.
- Next, In the sidebar, click Restriction Rule, and then click Create New Rule.
- After that, enter the rule’s name and full name. The full name is the name of the component used by the API.
- To have the rule take effect upon saving, select Active.
- Under User Criteria, select which users this this rule applies to.
- Then, Under Record Criteria, select which records the specified users are allowed to see.
For the Field value, you can reference another object’s field using dot notation. - Click Create.
Consideration
1. Before creating restriction rules, turn off Salesforce Classic for your org. 2. This is available for custom objects contracts events tasks time sheets time sheet entries 3. In calendars, if the Show Details access level is selected, users can see the subject of all events, regardless of the restriction rules created. Link of the Official Documentation
Disclaimer : This article is not endorsed by Salesforce or any other company in any way. This is my view and knowledge on the topic which I wrote. Please always refer to Official Documentation for the latest information.

Leave a Reply