Hello Everyone, In the last post we have discussed how we can quickly setup the SFDX. We also use the basic command to move code using SFDX, create scratch org and use them for development.
Today we will cover If we are an ISV partner so how we can best use the SFDX and how we can move our package code into scratch org to continue with development and effectively use the SFDX.
First we need to authenticate our dev hub org. Then we will create a new project to store our project metadata.
sfdx force:project:create -n MyPkgProject cd MyPkgProject
Now we need to authentic our package org to take a backup of code.
sfdx force:auth:web:login -a MyPkg
Now make a directory to store the metadata and fetch the data from source.
sfdx force:mdapi:retrieve -s -r ./dummy -u MyPkg -p TestData
This will gives us a zip file. Which we need to unzip. Next we will convert this metadata into SFDX format.
sfdx force:mdapi:convert -r ./dummy
Next we will create a new scratch org to move our metadata there.
sfdx force:org:create -s -f config/project-scratch-def.json -a pkgscratchorg
And when our scratch org is created we are ready to push our code into new scratch org.
And when we get the success message we can open the org and can continue with our development.
So within few steps we can easily move our packaging code to SFDX format and can use all the benefit of SFDX.
Did you have anything to add, Let me know in the comments section. Happy programming 🙂