Metadata API

Metadata API

Use this API to retrieve, deploy, create, update or delete customization information, such as custom object definitions and pagelayouts, for your organization. This API is intended for managing customizations and for building tools that can manage the metadatamodel, not the data itself.To create, retrieve, update or delete records, such as accounts or leads, use dataSOAP API or REST API.

Retrieving and Deploying Metadata

Retrieve and deploy metadata using the Metadata.Operations class.

Use the Metadata.Operations.retrieve() method to synchronously retrieve metadata from the current org. Provide a list of metadata component names that you want to retrieve. Salesforce returns a list of matching component data, represented by component classes that derive from Metadata.Metadata.

Use the Metadata.Operations.enqueueDeployment() method to asynchronously deploy metadata to the current org. Deployment is queued for asynchronous processing. When deploying metadata, you can create and update components, but not delete components. There are limitations on which components that apps and packages can deploy and which types of apps and packages can deploy to which types of orgs.

Permanent link to this article: https://salesforcebuddy.com/2019/02/metadata-api/

Leave a Reply

Your email address will not be published.