Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
DeployContainer Class
Namespace
Usage
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
Meta
data component to remove.
removeMetadataByFullName(fullName)
Signature
public Boolean removeMetadataByFullName(String fullName)
Parameters
-
fullName:
Type: String
Full
name of the component to remove.