Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
Convert Files in Metadata Format to Source Format
The convert command ignores all files that start with a “dot,” such as .DS_Store. To exclude more files from the convert process, add a .forceignore file.
- Change to your Salesforce DX project directory.
-
Convert the files from metadata format to source format with the project convert mdapi command. Let’s say your metadata-format
files are in a directory called /Users/testing/mdapi_project.
1sf project convert mdapi --root-dir /Users/testing/mdapi_projectThe --root-dir flag is the name of the directory that contains the metadata format files.
The converted source is stored in the default package directory indicated in the sfdx-project.json file, typically named force-app. Use the --output-dir flag to put the converted files in a different package directory; the command creates the directory if it doesn’t exist.
- If the convert created a package directory in your project, add it to your sfdx-project.json file.