Newer Version Available
RestrictionRule
Supported SOAP API Calls
create(), delete(), describeSObjects(), query(), retrieve(), update(), upsert()
Supported REST API Methods
DELETE, GET, HEAD, PATCH, POST, Query
Special Access Rules
Only users with the View Restriction and Scoping Rules permission can view restriction rules and scoping rules via the API. Only users with the Manage Sharing permission can view, create, update, and delete restriction rules and scoping rules.
Fields
| Field | Details |
|---|---|
| Description |
|
| DeveloperName |
|
| EnforcementType |
|
| FullName |
|
| IsActive |
|
| Language |
|
| MasterLabel |
|
| Metadata |
|
| RecordFilter |
|
| TargetEntity |
|
| UserCriteria |
|
| Version |
|
Usage
The following is an example of a RestrictionRule representing a restriction rule.
1{
2 "FullName":"restriction_rule_tasks_you_own",
3 "Metadata": {
4 "active":true,
5 "description":"Allows users of a specific profile to see only tasks that they own.",
6 "enforcementType":"Restrict",
7 "masterLabel":"Tasks You Own",
8 "recordFilter":"OwnerId = $User.Id",
9 "targetEntity":"Task",
10 "userCriteria":"$User.ProfileId = '00exxxxxxxxxxxx'",
11 "version":1
12 }
13}The following is an example of a RestrictionRule representing a scoping rule.
1{
2 "FullName":"Department A contact scoping rule",
3 "Metadata": {
4 "active":true,
5 "description":"View contacts from Department A.",
6 "enforcementType":"Scoping",
7 "masterLabel":"SR for Department A",
8 "recordFilter":"Department=$User.Department",
9 "targetEntity":"Contact",
10 "userCriteria":"$User.UserRoleId = '00Exxxxxxxxxxxx'",
11 "version":1
12 }
13}