Newer Version Available

This content describes an older version of this product. View Latest

Retrieve and Update Information

Use the GET, PATCH, and DELETE methods to retrieve, update, and delete scoping rules.
Available in: Lightning Experience in Performance and Unlimited Editions

Retrieve

To retrieve information about a scoping rule, use the GET method.

Example HTTP Method and URI:

GET /services/data/v60.0/tooling/query/?q=SELECT+id,+targetEntity,+enforcementType,+recordFilter,+userCriteria+FROM+RestrictionRule+WHERE+enforcementtype='Scoping'

Update

To update a scoping rule, use the PATCH method.

We recommend that you don’t update the value of targetEntity after a scoping rule is created. Instead, delete the scoping rule and create another one with the correct values.

Example HTTP Method and URI:

PATCH /services/data/v60.0/tooling/sobjects/RestrictionRule/0eYxxxxxxxxxxxx2AY

Replace 0eYxxxxxxxxxxxx2AY with the ID returned when the scoping rule was created.

Example Request Body:

Include all Metadata fields, even if you aren’t updating them. Specify the FullName value only if you’re changing this field.

This example deactivates the scoping rule by setting active to false.

Delete

To delete a scoping rule, use the DELETE method.

Example HTTP Method and URI:

DELETE /services/data/v60.0/tooling/sobjects/RestrictionRule/0eYxxxxxxxxxxxx2AY

Replace 0eYxxxxxxxxxxxx2AY with the ID returned when creating the scoping rule.

If the userCriteria or recordCriteria field contains a Salesforce org ID and you’re deploying to a different org than the org you retrieved them from, modify the Salesforce ID first.

Note