Menu
subscribe our youtube channel popup

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

  1. 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).
  2. 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. 
  3. Supported Objects:
    • Applicable to custom objects and selected standard objects like Account, Case, Contact, Event, Lead, Opportunity, and Task.
  4. Rule Limits:
    • Enterprise and Developer editions allow up to two active rules per object.
  5. 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.

Restriction Rules in Salesforce

Learn more about Salesforce Restriction Rules.

Key Features

  1. 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.
  2. Enhanced Security:
    • Ideal for controlling access to sensitive or confidential information that should not be visible to certain users.
  3. Supported Objects:
    • Applicable to custom objects, external objects, contracts, tasks, events, time sheets, and time sheet entries.
  4. Rule Limits:
    • Enterprise and Developer editions allow up to two active rules per object.
  5. 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

FeatureScoping RulesRestriction Rules
PurposeRefine default record visibility for usersActively restrict access to specific records
Impact on Data AccessDoes not restrict access, i.e., users can still access all records they have permission forEnforces strict record-level security, i.e., users cannot access restricted records
Impact on Sharing RulesOnly filters recordsOverrides sharing rules
FlexibilityAdaptive 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 reportsRigid 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 CasesFocuses users on relevant records (Productivity enhancement)Ensures strict data security (Data security and compliance)
Applies ToList Views, SOQL, ReportsLinks, List Views, Lookups, Records, Related Lists, Reports, Search, SOQL, SOSL
Supported ObjectsCustom objects, selected standard objects such as Accounts, Cases, Contacts, Events, Leads, Opportunities, TasksCustom objects, external objects, Contracts, Tasks, Events
Rule LimitsMaximum Number of Scoping Rules per Object: 2 active rulesMaximum Number of Scoping Rules per Org: 10 active rulesMaximum Number of Scoping Rules per Object: 2 active rulesMaximum Number of Scoping Rules per Org: 10 active rules
Impact on PerformanceImproves performance by limiting displayed recordsEnsures compliance and security

Implementation Steps

Creating a Scoping Rule

  1. Navigate to Setup > Object Manager.
  2. Select the object for which you need to set scoping rules
  3. Click “Scoping Rules” from the left side panel and create a new rule.
  4. Define user criteria and record criteria.
  5. 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

  1. Navigate to Setup > Object Manager.
  2. Select the object for which you need to set scoping rules
  3. Click “Restriction Rules” from the left side panel and create a new rule.
  4. Define user criteria and record criteria.
  5. 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.

Sheima Latha J
Sheima Latha J
Articles: 27

Leave a Reply

Your email address will not be published. Required fields are marked *