Our Blog

Salesforce Developer Experience

Salesforce Developer Experience

Salesforce Developer Experience

The Salesforce Developer Experience (DX) is a set of tools that streamlines the entire development life cycle. It also helps us to improves continuous integration, team development, and collaboration.


Developer Hub Org:

Developer Hub is the main Salesforce org that we use to create and manage our scratch orgs.


Scratch Org:

A scratch org is a dedicated, configurable, and short-term Salesforce environment that you can quickly spin up when starting a new project it is only for maximum 30 days, No of the day can be set at the creation time of the scratch org.


Before we start the development cycle make sure you have to install Salesforce CLI in your system

To check CLI is properly installed, enter sfdx in a command window.


sfdx COMMAND [command-specific-options]

Help topics, type "sfdx help TOPIC" for more details:

sfdx force # tools for the salesforce developer

sfdx plugins # manage plugins

sfdx update # update sfdx-cli


Log In to the Dev Hub:

To authorize the Dev Hub, in the command window enter. The following command opens the Salesforce login page in the web browser

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

In the above command, we have created an alias DevHub by using -a and make this the default org using -d.


Create Scratch Org:

After the dev hug is authorized we are ready to create scratch org but the last thing we need is scratch org definition in the file project-scratch-def.json.Here we can define the feature scratch org will have like

  • Person account enable
  • Multicurrency enable
  • Org with/without dummy record

The definition looks like this


  "orgName": "webkul",

  "edition": "Developer",

  "hasSampleData": "false",

  "settings": {

    "orgPreferenceSettings": {

      "s1DesktopEnabled": true,

      "selfSetPasswordInApi": true,

      "s1EncryptedStoragePref2": false





To create scratch org use the following command and also set it as our default, and give it an alias:

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


Some helpful Command:

To open default scratch org:

sfdx force:org:open


to check available scratch org and authorize scratch org

sfdx force:org:list


To check available scratch org and authorize scratch org even the expired org

sfdx force:org:list --all


To generate scratch org password

sfdx force:user:password:generate


To Push Source Metadata to Scratch Org

sfdx force:source:push

To  pull Metadata from Scratch Org

sfdx force:source:pull



If you have any issue feel free to add a ticket and let us know your views to make it better https://webkul.uvdesk.com/en/customer/create-ticket/


Leave a Comment

Comments (0)

Please verify that you are not a robot.

Welcome back

Welcome back! Please enter your details

One or more fields have an error. Please check and try again.

Forgot Password?

Tell us about Your Company

How can we help you with your business?