Newer Version Available

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

MetadataContainer

Manages working copies of ApexClassMember, ApexTriggerMember, ApexPageMember and ApexComponentMember objects, including collections of objects that should be deployed together.

Supported SOAP API Calls

create()delete()describeSObjects()query()retrieve()update()upsert()

Supported REST API HTTP Methods

Query, GET, POST, PATCH, DELETE

Fields

Field Name Details
Name
Type
string
Properties
Create, Filter, Group, Sort, Update
Description
The name of the MetadataContainer. If a container with the same name already exists, an error is reported on create() or POST.

This field is required.

Usage

Use a MetadataContainer as a package for your tool’s workspace. As a user works in the tool, update the ApexClassMember, ApexTriggerMember, ApexPageMember and ApexComponentMember objects in the MetadataContainer and use a ContainerAsyncRequest object to save and deploy changes to the current organization.

A MetadataContainer can be reused, but container members can’t.
  • When a ContainerAsyncRequest completes successfully, the MetadataContainerId field on all container members is changed from the ID of the MetadataContainer to the ID of the ContainerAsyncRequest. At this point, container members can no longer be modified or deployed, and can’t be queried via the MetadataContainer; you have to query the ContainerAsyncRequest to see what was deployed.
  • If the deployment fails, container members remain on the MetadataContainer and can still be modified until they are successfully deployed on another ContainerAsyncRequest. The MetadataContainerId field on the completed (failed deployment) ContainerAsyncRequest is set to the ID of the MetadataContainer, so you can have multiple completed ContainerAsyncRequests on a single MetadataContainer.

Deleting a MetadataContainer deletes all objects that reference it.

Note