---
schema_version: "1"
id: 3f5054f7810e81b52989120f44566f274a3668b4c4b3150400d2e7e2a2c761b5
title: Scoping Rule Example Scenarios
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/security_scoping_rule_examples.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.security_scoping_rule_examples.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: e010fafa17fe7c9e9fdb7c2ab5f9feb11cdc08684501cd887f32456fa3252366
description: Refer to these sample scoping rules, which fulfill different access requirements.
products:
  - Security
  - Salesforce Platform
release: "264"
---
# Scoping Rule Example Scenarios

Refer to these sample scoping rules, which fulfill different access requirements.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Performance</strong>, <strong>Unlimited</strong>, and <strong>Developer</strong> Editions</td></tr></tbody></table>

To implement these examples, navigate to a supported object in the Object Manager and click **Scoping Rules**.

## Display a Branch Location’s Tasks by Default

This scoping rule displays task records associated with a particular bank branch location by default. A custom field called Branch\_\_c stores the bank’s branch locations.

     
| Criteria | Click Path | Field | Operator | Type | Value |
| --- | --- | --- | --- | --- | --- |
| User Criteria | **User** | **Role ID** | $User.UserRoleId | Equals | ID | 00Exxxxxxxxxxxx |
| Record Criteria | **Task** | **Branch\_\_c** | \[Task\].Branch\_\_c | Equals | String | Bank Branch 1 |

## Display a Department’s Contacts by Default

This scoping rule displays contact records associated with a particular department by default for a user who works on them. The rule dynamically matches the contact owner's department with the current user's department.

     
| Criteria | Click Path | Field | Operator | Type | Value |
| --- | --- | --- | --- | --- | --- |
| User Criteria | **User** | **Role ID** | $User.UserRoleId | Equals | ID | 00Exxxxxxxxxxxx |
| Record Criteria | **Contact** | **Department** | \[Contact\].Department | Equals | Current User | $User.Department |

## Display a Division’s Tasks by Default

This scoping rule displays records associated with a particular division by default for a user.

     
| Criteria | Click Path | Field | Operator | Type | Value |
| --- | --- | --- | --- | --- | --- |
| User Criteria | **User** | **Profile** | $User.Profile | Equals | ID | 00exxxxxxxxxxxx |
| Record Criteria | **Task** | **Assigned To ID (User) Division** | \[Task\].Owner:User:Division | Equals | Current User | $User.Division |

## Scope Records Using Multiple String or ID Values in Record Criteria

This scoping rule allows active users to scope the records they see to records whose Name\_\_c field matches the rule’s record criteria value. The record criteria contains strings separated by a comma. ID values are also supported. Double-quotes specify that the value inside the quotes isn’t considered a delimiter.

This rule uses a custom object called Agent\_\_c with a text field called Name\_\_c.

     
| Criteria | Click Path | Field | Operator | Type | Value |
| --- | --- | --- | --- | --- | --- |
| User Criteria | **User** | **Active** | \[$User\].IsActive | Equals | Boolean | True |
| Record Criteria | **Agent\_\_c** | **Name\_\_c** | \[Agent\_\_c\].Name\_\_c | Equals | String | Tom, Anita, “Torres, Jia” |

This scoping rule allows active users to see records owned by two different managers. In this example, the rule’s record criteria contains IDs separated by a comma.

     
| Criteria | Click Path | Field | Operator | Type | Value |
| --- | --- | --- | --- | --- | --- |
| User Criteria | **User** | **Active** | \[$User\].IsActive | Equals | Boolean | True |
| Record Criteria | **Agent\_\_c** | **Owner ID (User) Manager ID** | \[Agent\_\_c\].Owner:User:ManagerId | Equals | ID | 001xx000003HNy7, 001xx000003HNut |