

Scoping Rules Vs. Restriction Rules
Salesforce provides powerful tools to manage data visibility and access within its platform. Among these tools are Scoping Rules and Restriction Rules, which serve distinct purposes and cater to different use cases. While both aim to improve user productivity and enhance security, they differ significantly in functionality, implementation, and impact on data access. This article delves into the details of Scoping Rules and Restriction Rules, compares their features, and highlights their major differences. Let’s see the Scoping Rules Vs. Restriction Rules.
Understanding Scoping Rules
Scoping Rules are designed to control the default records that users see based on predefined criteria. They act as filters that help users focus on the most relevant data without restricting their overall access to records. Scoping Rules enhance productivity by reducing noise and unnecessary searches, ensuring users can concentrate on high-priority tasks.
Key Features
- Default Record Visibility:
- Scoping Rules allow administrators to filter the records that appear by default in list views, searches, and reports based on criteria such as region, role, or ownership.
- Users can still access all records they have permission to view through other means (e.g., reports).
- Dynamic Switching:
- Scoping Rules allow users to adapt their view of records dynamically. Users can easily switch between different predefined scopes to focus on specific sets of records.
- Supported Objects:
- Applicable to custom objects and selected standard objects like Account, Case, Contact, Event, Lead, Opportunity, and Task.
- Rule Limits:
- Enterprise and Developer editions allow up to two active rules per object.
- No Impact on Security:
- Scoping Rules do not restrict access; they only refine the default view of records.
Use Cases
- Sales teams to view only their assigned leads or opportunities.
- Support agents focusing on cases relevant to their region or expertise.
- Marketing teams targeting specific accounts or contacts based on engagement criteria.
Understanding Restriction Rules
Restriction Rules, as the name suggests, actively limit user access to specific records based on defined criteria. Unlike Scoping Rules, Restriction Rules enforce security by preventing users from accessing records that do not match the specified conditions.
Learn more about Salesforce Restriction Rules.
Key Features
- Record Access Limitation:
- Restriction Rules filter out records that fall outside the defined criteria, making them inaccessible to users.
- This behaviour is permanent and overrides sharing settings.
- Enhanced Security:
- Ideal for controlling access to sensitive or confidential information that should not be visible to certain users.
- Supported Objects:
- Applicable to custom objects, external objects, contracts, tasks, events, time sheets, and time sheet entries.
- Rule Limits:
- Enterprise and Developer editions allow up to two active rules per object.
- Permanent Filtering:
- Restriction Rules apply permanently across List Views, Lookups, Related Lists, Reports, Search results, SOQL queries, and SOSL searches.
Use Cases
- Preventing competing sales teams from viewing each other’s activities.
- Limiting access to confidential contracts or sensitive customer data.
- Ensuring only authorized team members can view specific tasks or events.
Major Differences Between Scoping Rules Vs. Restriction Rules
Feature | Scoping Rules | Restriction Rules |
Purpose | Refine default record visibility for users | Actively restrict access to specific records |
Impact on Data Access | Does not restrict access, i.e., users can still access all records they have permission for | Enforces strict record-level security, i.e., users cannot access restricted records |
Impact on Sharing Rules | Only filters records | Overrides sharing rules |
Flexibility | Adaptive Viewing, meaning that even when a Scoping Rule filters the default view, users retain full access to all records they are permitted to see. They can access these records through other means, such as searching or using reports | Rigid Filtering, meaning that the Restriction Rules enforce a rigid filter on records, limiting users to only those that meet the specified criteria. Unlike Scoping Rules, users cannot switch between different views of records based on these rules |
Use Cases | Focuses users on relevant records (Productivity enhancement) | Ensures strict data security (Data security and compliance) |
Applies To | List Views, SOQL, Reports | Links, List Views, Lookups, Records, Related Lists, Reports, Search, SOQL, SOSL |
Supported Objects | Custom objects, selected standard objects such as Accounts, Cases, Contacts, Events, Leads, Opportunities, Tasks | Custom objects, external objects, Contracts, Tasks, Events |
Rule Limits | Maximum Number of Scoping Rules per Object: 2 active rulesMaximum Number of Scoping Rules per Org: 10 active rules | Maximum Number of Scoping Rules per Object: 2 active rulesMaximum Number of Scoping Rules per Org: 10 active rules |
Impact on Performance | Improves performance by limiting displayed records | Ensures compliance and security |
Implementation Steps
Creating a Scoping Rule
- Navigate to Setup > Object Manager.
- Select the object for which you need to set scoping rules
- Click “Scoping Rules” from the left side panel and create a new rule.
- Define user criteria and record criteria.
- Activate the rule and click Save.
Example: A Site Inspector at Blucon, a tower construction company, should primarily have access to sites assigned to them, ensuring a focused and efficient workflow. However, they should still be able to search for or generate reports on other sites when needed. To implement this level of visibility, a Scoping Rule can be configured on the Site object. The appropriate user criteria and record criteria for this rule are outlined in the image below.

Creating a Restriction Rule
- Navigate to Setup > Object Manager.
- Select the object for which you need to set scoping rules
- Click “Restriction Rules” from the left side panel and create a new rule.
- Define user criteria and record criteria.
- Activate the rule and click Save.
Example: The internal legal team at Blucon, a tower construction company, should have access exclusively to finalized site records, as their role does not require visibility into sites that are still under inspection or have been rejected. To enforce this data access control, a Restriction Rule can be applied to the Site object. The appropriate user criteria and record criteria for implementing this rule are detailed in the image below.

Conclusion
Scoping Rules and Restriction Rules are essential tools in Salesforce for managing data visibility and access. Scoping Rules optimize productivity by refining default views without restricting access, whereas Restriction Rules enforce strict security by permanently limiting user access to specific records.
Understanding when and how to use these rules is crucial for optimizing workflows and maintaining data integrity within your organization. By leveraging these features effectively, businesses can strike a balance between usability and security while ensuring compliance with organizational policies.
Both tools play a pivotal role in Salesforce’s ecosystem by empowering admins with granular control over data visibility tailored to their unique needs—whether to improve efficiency with Scoping Rules or to safeguard sensitive information with Restriction Rules.