Working with Non Scratch Orgs

If we want to deploy SFDX source format to non-scratch orgs, initially(in the beginning days of sfdx) we need to convert the source format into Metadata format then only we can deploy using SFDX commands. But now, we can deploy to non-scratch orgs without converting into Metadata format.

Note: Suppose, if I am trying to deploy to scratch org then we will use PUSH command, to retrieve from scratch org we can use PULL command. These 2 commands will exchange only the latest version of metadata ( in other words the new updated components) between scratch org and local repository. If we deploy to non-scratch org using below commands then these commands can not identify the latest version of changes neither in Local repository nor in Non-Scratch org.

To Deploy a class which is in local repository to your Developer org (non-scratch org), use the below syntax
sfdx force:source:deploy -p <pathToDeploy> -u <orgUserName>
For example, class path in my local repository :
Then actual command to Deploy will looks like below :
sfdx force:source:deploy -p 
D:\SFDX\lwc-recipes-master\lwc-recipes-master\
force-app\
main\default\classes\
AccountController.cls -u
integrationorg2@salesforce.com
Working scenario:

Similarly, we can also retrieve from non-scratch orgs using below syntax
sfdx force:source:retrieve -p <pathToRetrieve> -u <orgUserName>
tHiNk gooD and dO thE bEsT.........MANJU NATH 🌝

Comments