Newer Version Available

This content describes an older version of this product. View Latest

Retrieve Unpackaged Source Defined in a package.xml File

If you already have a package.xml file, you can retrieve it, unzip it in your local project, and convert the source to Salesforce DX format. You can do all these tasks from the CLI. The package.xml file defines the source you want to retrieve.

If you already have the source retrieved from the Metadata API, you can skip to converting the metadata API source.

  1. In the project, create a folder to store what’s retrieved from your org, for example, mdapipkg.
  2. Retrieve the metadata.
    The username can be the scratch org username or an alias. The -k parameter indicates the path to the package.xml file, which is the unpackaged manifest of components to retrieve.
  3. Check the status of the retrieve.
  4. Unzip the zip file.
  5. (Optional) Delete the zip file.

After you retrieve the source and unzip it, you no longer need the zip file, so you can delete it.

After you finish, convert the metadata source.