Newer Version Available
DeployContainer Class
Namespace
Usage
Use Metadata.DeployContainer to
manage custom metadata components for deployment. A container must have one or more components
before being deployed.
Example
1// Use DeployContainer for deployment
2Metadata.DeployContainer mdContainer = new Metadata.DeployContainer();
3mdContainer.addMetadata(customMetadata);
4
5...
6
7// Enqueue deploy
8Metadata.Operations.enqueueDeployment(mdContainer, callback);DeployContainer Methods
The following are methods for DeployContainer.
addMetadata(md)
Signature
public void addMetadata(Metadata.Metadata md)
Parameters
- md
- Type: Metadata.Metadata
- A custom metadata component class that derives from Metadata.Metadata. Avoid adding components to a Metadata.DeployContainerthat have the same Metadata.Metadata.fullName because it causes deployment errors.
Return Value
Type: void
getMetadata()
Signature
public List<Metadata.Metadata> getMetadata()
Return Value
Type: List<Metadata.Metadata>
removeMetadata(md)
Signature
public Boolean removeMetadata(Metadata.Metadata md)
Parameters
- md
- Type: Metadata.Metadata
- Metadata component to remove.
removeMetadataByFullName(fullName)
Signature
public Boolean removeMetadataByFullName(String fullName)
Parameters
- fullName
- Type: String
- Full name of the component to remove.