Newer Version Available
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.
- In the project, create a folder to store what’s retrieved from your org, for example, mdapipkg.
-
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.
-
Check the status of the retrieve.
- Unzip the zip file.
- (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.