---
schema_version: "1"
id: 3955ab9fb13329b8a295becec2ef5ef44db5dd84389897e8c6e8ba2aa9adfddc
title: Display a Branch Location’s Records by Default
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/security/scoping-rules-dev-guide/guides/scoping-rules/examples/scoping-rules-example-location.md
canonical_url: https://developer.salesforce.com/docs/platform/scoping-rules-dev-guide/guide/scoping-rules-example-location.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 36a4165a3e13f21fff9b3e184829fb16d698fe258e8550783c19e7a1b5a3b90b
products:
  - Scoping Rules Developer Guide
  - Security
---

# Display a Branch Location’s Records 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.

|Required Editions|
|-----------------|
|Available in: Lightning Experience in **Performance**,**Unlimited**, and **Developer** editions.|

## Tooling API

```nolang
{
    "FullName":"Task scoping rule on Bank Branch 1",
    "Metadata": {
         "active":true,
         "description":"View tasks for Bank Branch 1.",
         "enforcementType":"Scoping",
         "masterLabel":"SR for Bank Branch 1",
         "recordFilter":"Branch__c = $User.Branch__c",
         "targetEntity":"Task",
         "userCriteria":"$User.UserRoleId = '00Exxxxxxxxxxxx'",
         "version":1
    }
}

```

## Metadata API

```nolang
<?xml version="1.0" encoding="UTF-8"?>
<RestrictionRule xmlns="http://soap.sforce.com/2006/04/metadata">
    <active>true</active>
    <description>View tasks for Bank Branch 1.</description>
    <enforcementType>Scoping</enforcementType>
    <masterLabel>SR for Bank Branch 1</masterLabel>
    <recordFilter>Branch__c = $User.Branch__c</recordFilter>
    <targetEntity>Task</targetEntity>
    <userCriteria>$User.UserRoleId = '00Exxxxxxxxxxxx'</userCriteria>
    <version>1</version>
</RestrictionRule>

```

