Salesforce DX – Spinning Up a new scratch org

|
| By Webner

Steps to create scratch org in Salesforce DX

  1. Open the directory folder where the Salesforce DX code is present.
  2. Create scratch org with the help of a command palette or Terminal by authorizing dev hub.
    To Authorize dev hub Press Ctrl+shift+P and type (Authorize a Dev Hub)

    • Create a default scratch org again using Ctrl+Shift+P and type (Create a Default Scratch Org)
    • Select option-project-scratch-def.json.
    • Give alias to your org.
    • Enter the number of days you want for your scratch org to be alive.
  3. Open the org Press Ctrl+shift+P and type (Open Default Org).
  4. Reset the password for the user. The steps are given below.
    Salesforce DX
  5. Enable the country and state picklist. Click on each of the links in a serial manner given on each of the 4 points present on State and Country/Territory Picklists.
    Salesforce-dx1
    Select the United States in Default Country/Territory picklist and click on save. After that click on the 2nd option Scan Now and you will receive an email upon its completion and then click on the 3rd option Convert now.
    Salesforce-dx2
    After Clicking on Convert Now select United states in Change to picklist and click on Scan to Complete and then click on next.
    Salesforce3
    After that Select California in Change to picklist and click on Scan to Complete and then click on Finish and Enable.
    Salesforce4
  6. Search for package manager in production org and select the desired stable package to install.
  7. Install production org package in Scratch org.
  8. Now your scratch org is ready to use.

Leave a Reply

Your email address will not be published. Required fields are marked *