12.07.2015 Views

Database.com Metadata API Developer's Guide - Salesforce.com

Database.com Metadata API Developer's Guide - Salesforce.com

Database.com Metadata API Developer's Guide - Salesforce.com

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

File-Based Callsdeploy()2. If the call is not <strong>com</strong>plete, issue a checkStatus() call in a loop using the value in the id field of the AsyncResult objectreturned by the deploy() call in the previous step. Check the AsyncResult object which is returned until the done fieldcontains true. The time taken to <strong>com</strong>plete a deploy() call depends on the size of the zip file being deployed, so a longerwait time between iterations should be used as the size of the zip file increases.3. Issue a checkDeployStatus() call to obtain the results of the deploy() call, using the id value returned in the firststep.To delete items, use the same procedure, but also include a delete manifest file named destructiveChanges.xml. Tobypass the Recycle Bin, see purgeOnDelete.The format of destructiveChanges.xml is the same as package.xml, except that wildcards are not supported.Note: If you try to delete some <strong>com</strong>ponents that do not exist in the organization, the rest of the deletions are stillattempted.The following is a sample destructiveChanges.xml file that names a single custom object to be deleted:MyCustomObject__cCustomObjectIn order to deploy the destructive changes, you must also have a package.xml file that lists no <strong>com</strong>ponents to deploy, includesthe <strong>API</strong> version, and is in the same directory as destructiveChanges.xml:30.0To track the status of deployments that are in progress or <strong>com</strong>pleted in the last 7 days, from Setup, click Deployments orDeploy > Monitor Deployments.You can cancel a deployment while it’s in progress or in the queue by clicking Cancel next to the deployment. The deploymentthen has the status Cancel Requested until the deployment is <strong>com</strong>pletely canceled. A canceled deployment is listed in theFailed section.PermissionsYour client application must be logged in with the “Modify All Data” permission.ArgumentsNamezipFiledeployOptionsTypebase64DeployOptionsDescriptionBase 64-encoded binary data. Client applications must encode the binary data as base64.Encapsulates options for determining which packages or files are deployed.DeployOptionsThe following deployment options can be selected for this call:26

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!