Namespace
Usage
Use Metadata.DeployContainer to
manage custom metadata components for deployment. A container must have one or more components
before being deployed.
Example
// Use DeployContainer for deployment Metadata.DeployContainer mdContainer = new Metadata.DeployContainer(); mdContainer.addMetadata(customMetadata); ... // Enqueue deploy Metadata.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
Meta
data component to remove.
removeMetadataByFullName(fullName)
Signature
public Boolean removeMetadataByFullName(String fullName)
Parameters
-
fullName:
Type: String
Full
name of the component to remove.