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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CRUD-Based Callsdelete()3. An AsyncResult object is returned for each <strong>com</strong>ponent you triy to create, and is updated with status information as theoperation moves from a queue to <strong>com</strong>pleted or error state. Call checkStatus() in a loop until the status values inAsyncResult indicate that all create operations are <strong>com</strong>pleted. Start with a wait time of one second between iterations ofcheckStatus() calls, and double the wait time each time you make a subsequent call.Sample Code—JavaSee Step 3: Walk Through the Java Sample Code on page 7 for sample Java code using the create() call.ArgumentsNamemetadataType<strong>Metadata</strong>[]DescriptionArray of one or more metadata <strong>com</strong>ponents.Limit: 10.You must submit arrays of only one type of <strong>com</strong>ponent. For example, you could submitan array of 10 custom objects or 10 profiles, but not a mix of both types.ResponseAsyncResult[]delete()Deletes one or more <strong>com</strong>ponents from your organization asynchronously.You can use this call to delete any of the objects that extend <strong>Metadata</strong>. For more details, see <strong>Metadata</strong> Components and Typeson page 75.SyntaxAsyncResult[] = metadataConnection.delete(<strong>Metadata</strong>[] metadata);UsageUse this call to delete one or more <strong>com</strong>ponents from your organization.PermissionsYour client application must be logged in with the “Modify All Data” permission.Rules and <strong>Guide</strong>linesWhen deleting <strong>com</strong>ponents, consider the following rules and guidelines:• Your client application must be logged in with sufficient access rights to delete individual <strong>com</strong>ponents within the specified<strong>com</strong>ponent. For more information, see “Factors that Affect Data Access” in the SOAP <strong>API</strong> <strong>Developer's</strong> <strong>Guide</strong>.• In addition, you might also need permission to access this <strong>com</strong>ponent’s parent <strong>com</strong>ponent.• To ensure referential integrity, this call supports cascading deletions. If you delete a parent <strong>com</strong>ponent, you delete itschildren automatically, as long as each child <strong>com</strong>ponent can be deleted.Basic Steps for Deleting <strong>Metadata</strong> ComponentsUse the following process to delete metadata <strong>com</strong>ponents:43

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

Saved successfully!

Ooh no, something went wrong!