Deployment Step: MetaData

Updated 5 days ago by Copado Solutions

This article is part of the Deployment Steps.

The MetaData deployment step lets you deploy metadata components from one org to another using the Metadata API. For a complete list of deployable metadata components please refer to Salesforce Metadata API documentation.

When this deployment step is executed, the selected metadata components are retrieved from the source org and then deployed to the destination org. 

If you are deploying Vlocity components, you can add @debug to the deployment name to review the Vlocity logs.

Step Options

  • Check Only: If the Check Only box is enabled, the changes will not be deployed, it will be a validation-only deployment.
  • Test Level deploy options:
    • No Test Run (no Apex test are run unless it is a production deployment).
    • Run Specified Tests (only included apex test classes are run, aka fast deploy).
    • Run Local Tests (all Apex test classes excluding managed packages are run).
    • Run All Tests In Org (all Apex test classes including managed packages are run).

For more information about test levels, check out the article Apex Tests Run While Deploying .

  • Find and Replace in files allows you to find a specific text inside the metadata files, using a regular expression for matching and replacing matching pieces with a given text. Use cases for this feature are countless, but here are a few examples:
    • Deploy outbound messages is now possible by replacing the Run as username with the right username in the destination org. Find regex: 


      Replace with:

    • Deactivate workflow rules: Find regex: 


      Replace with: 


    • Remove weblinks from page layouts: Find regex:  


      Replace with: 


      In this case, since you are removing a weblink, you will need to leave 'Replace with' blank.
    • Skip a specific user permission (typically needed when deploying between two different Salesforce releases). Find regex:


      Replace with: 

      In this case, since you want to skip a user permission, you will need to leave 'Replace with' blank.
      Change DelegatedTwoFactor with the permission name to replace.
    • Skip a field from a layout (typically needed when the field doesn't exist in the destination). Find regex: 


      Replace with: 


      In this case, since you want to skip a field, you will need to leave 'Replace with' blank.
      Change Account_Executive__c with the field name to replace.
If the deployment fails with an UNKNOWN_EXCEPTION, Copado will send you an email with the zip folder used in the deployment.

How did we do?