Salesforce DX : Commands(SFDX)

In this post we will go through the important commands used in SFDX and what is the meaning of the syntax of these commands. Before that we suggest you to go through an overview about Salesforce DX( Salesforce DX : An Overview ) to know basics of SFDX.


sfdx force:org:create -f config/enterprise-scratch-def.json -a MyScratchOrg

To Authorize SFDX Org to login in Developer Org:

sfdx force:auth:web:login --UserName --setalias myAlias

To Open your Developer Org:

sfdx force:org:open -u MyNinjaOrg

To Delete your Scratch Org:

sfdx force:org:delete -u MyNinjaAlias -p

To Run Test Classes:

sfdx force:apex:test:run

To Pull All the changes done in your Scratch Org:

sfdx force:source:pull 

To Push Changes to the SFDC Scratch Org:

sfdx force:source:push

To Deploy the components to the SFDC Org:

sfdx force:source:deploy -p force-app/main/default/Ninja.cmp

To Get the components to the SFDC Org:
For All Components :
sfdx force:source:retrieve -x manifest/package.xml

For Specific Components:
sfdx force:source:retrieve -p force-app/main/default/Ninja.cmp

So these are some mostly used SFDX commands.
For any Queries please comment.

For Linking your Org to VS code : How to Link Sandbox to VS Code: Salesforce DX



Comments