Saturday 13 June 2020

Salesforce DX and Most Popular Commands

What is Salesforce DX?

Salesforce Developement Experience (DX) is a set of tools that streamlines the entire development life cycle. It brings modern software delivery and development practices to the Salesforce platform. 

Salesforce DX offers you an open and standard developer experience, which helps you build application using the tools like Git, Eclipse, Selenium and more. Salesforce DX consists of an updated Eclipse Integrated Development environment (IDE) which expands the value of the toolset to salesforce developers.

A Salesforce DX project is a local directory structure of your metadata in source format. It lets you develop and test with Salesforce DX tooling. It improves team development and collaboration, facilitates automated testing and continuous integration, and makes the release cycle more efficient and agile.


Commands:


1) Login to New Org and Set the org as Default:

        sfdx force:auth:web:login -d -a DevHub

2) Create an new project:

        sfdx force:project:create -n ExampleProjectName

        

3) Create New scratch org:

        sfdx force:org:create -s -f config/project-scratch-def.json - a ScrachOrgNameExample

4) Pull code:

        sfdx force:source:pull

5) Push code:

        sfdx force:source:push
    

6) open scratch org:

        sfdx force:org:open

7) Generate password for scratch org user:

        sfdx force:user:password:generate --targetUserName

8) See the password for scratch org user:

        sfdx force:user:display -u