Select your language

  • Davide Gammone

            

Davide Gammone.com
How to retrieve all Salesforce metadata with 2 commands

One of the first steps in implementing CI/CD for Salesforce is storing your Salesforce metadata in a Git repository.

Below are the steps and the sfdx command that allows you to retrieve all the metadata in the org or sandbox, without having to know in advance what types of metadata are available, which fields to include, etc...

As first step, you need to run the command to generate a package.xml file that includes every single metadata element present in the Org or Sandbox.

sfdx force source manifest create --from-org Alis_Org_Name --name=allMetadata --output-dir manifest

Once the command is executed, the allMetadata.xml file will be automatically created in the manifest folder.

The file will contain a list of all the metadata of the Org or Sandbox.

The next step is to simply right-click on the allMetadata.xml file and select "Retrieve Source in Manifest from Org".

Retrieve source in manifest from Org

That's it! All Salesforce metadata are now in the sfdx project.

The next steps are uploading to GitHub and configuring the pipeline.

GDPR Alert

This site uses cookies, including third-party requests, to offer you services in line with your preferences. By closing this banner, scrolling this page or clicking any element, you consent to the use of cookies. If you want to learn more or opt out of all or some cookies, click on Privacy Policy...