Newer Version Available
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.
| Available in: Lightning Experience in Performance and Unlimited Editions |
Tooling API
1{
2 "FullName":"Task scoping rule on Bank Branch 1",
3 "Metadata": {
4 "active":true,
5 "description":"View tasks for Bank Branch 1.",
6 "enforcementType":"Scoping",
7 "masterLabel":"SR for Bank Branch 1",
8 "recordFilter":"Branch__c = $User.Branch__c",
9 "targetEntity":"Task",
10 "userCriteria":"$User.RoleId = '00Exxxxxxxxxxxx'",
11 "version":1
12 }
13}Metadata API
1<?xml version="1.0" encoding="UTF-8"?>
2<RestrictionRule xmlns="http://soap.sforce.com/2006/04/metadata">
3 <active>true</active>
4 <description>View tasks for Bank Branch 1.</description>
5 <enforcementType>Scoping</enforcementType>
6 <masterLabel>SR for Bank Branch 1</masterLabel>
7 <recordFilter>Branch__c = $User.Branch__c</recordFilter>
8 <targetEntity>Task</targetEntity>
9 <userCriteria>$User.RoleId = '00Exxxxxxxxxxxx'</userCriteria>
10 <version>1</version>
11</RestrictionRule>