Converting Metadata Format to DX Format in Salesforce

Ben Butler
Jul 8, 2021

Today DX projects can be created, either as an empty state or with a manifest. But what if you have the metadata in the metadata format and want to use it in DX format.

Use the CLI to convert to DX format

force:mdapi:retrieve

sfdx force:mdapi:retrieve -r ./metadatadirectory

To convert it back to Metadata format, use the CLI for that too

force:mdapi:convert

sfdx force:mdapi:convert -r metadatadirectory/

--

--