Newer Version Available
Retrieve and Update Information
| Available in: Lightning Experience in Enterprise, Performance, Unlimited, and Developer Editions |
Retrieve
To retrieve information about your restriction rule, use the GET method.
Example HTTP Method and URI:
GET /services/data/v55.0/tooling/query/?q=SELECT+id,+targetEntity,+enforcementType,+recordFilter,+userCriteria+FROM+RestrictionRuleUpdate
To update the restriction rule, use the PATCH method.
We recommend that you don’t update the value of targetEntity after the restriction rule is created. Instead, delete the restriction rule and create another one with the correct values.
Example HTTP Method and URI:
PATCH /services/data/v55.0/tooling/sobjects/RestrictionRule/0eYxxxxxxxxxxxx2AYReplace 0eYxxxxxxxxxxxx2AY with the ID returned when creating the restriction rule.
Example Request Body:
All Metadata fields must be included, even if you aren’t updating them. Specify the FullName value only if you’re changing this field.
In this example, we deactivate the restriction rule by setting active to false.
Delete
To delete a restriction rule, use the DELETE method.
Example HTTP Method and URI:
DELETE /services/data/v55.0/tooling/sobjects/RestrictionRule/0eYxxxxxxxxxxxx2AYReplace 0eYxxxxxxxxxxxx2AY with the ID returned when creating the restriction rule.