Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.

Retrieve and Update Information

Use the deploy() and retrieve() calls to move metadata (XML files) between a Salesforce organization and a local file system.
Available in: Lightning Experience in Enterprise, Performance, Unlimited, and Developer Editions

For more information, see Deploying and Retrieving Metadata in the Metadata API Developer Guide.

If you include Salesforce org IDs in your userCriteria or recordCriteria fields, you must modify these IDs before deploying to the target org if different from the org where the restriction rules were retrieved.

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.

Note