Converting existing managed/unmanaged package code to DX Format

To convert existing source code from an unmanaged package, you can take the following steps: 

  1. Authenticate with your Developer Edition Org. Type the following command, then authenticate with your developer edition Org credentials, and accept to provide access to Salesforce DX. Type the command. Note that targetOrg is an alias that is assigned to the target Org. Alias is a shorthand string, so you don't have to type the username:
sfdx force:auth:web:login -a targetOrg
  1. Export the unmanaged package into a temp directory using the retrieve command and you will notice that, once the following commands have been executed, you will see a ZIP file in the temp folder:
mkdir temp
sfdx force:mdapi:retrieve -s -r./temp -u targetOrg -packagename
Here, packagename is the name of your unmanaged package.
  1. Unzip the file using the ZIP file utility.
  2. Execute the following command to convert the source code to the Salesforce DX project structure:
sfdx force:mdapi:convert -r./temp
  1. The preceding code assumes that you have created a DX project using the following commands:
sfdx force:project:create -n myproject
cd myproject
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.119.28.108