Create a Scratch Org

Enable Dev Hub

Prodly requires users to have Dev Hub enabled before creating a Scratch Org. Follow these steps to enable Dev Hub:

  1. Visit ‘Setup’ in your Control Org
  2. Use the Quick Find Box to search for ‘Dev Hub’
  3. Set the toggle to enabled on ‘Enable Dev Hub’

Identify an Org Shape

Scratch Orgs are based off of an Org Shape. An Org Shape can include Features, Metadata API Settings, Edition, Limits, and Licenses. Users must add their 15-digit control org Id listed as an Org Shape in the Production org they wish to use as the source for their scratch org shape. Follow these steps to identify an Org Shape:

  1. Login to your Source org
  2. Visit Setup
  3. Search for ‘Org Shape’
  4. Select the toggle for ‘Enable Org Shape for Scratch Orgs’
  5. List your 15 digit control org Id (Dev Hub must be enabled in your control org)
  6. Select ‘Save

Create a Scratch Org

Once an Dev Hub is enabled, users can create a Scratch Org by following these steps:

  1. Visit the Release Tab
  2. Select ‘Create Scratch’
  3. Add a Name
  4. Add a Username
  5. Select a Source
  6. Select a Duration
  7. If you wish to install packages:
    • Toggle on the Installed Packages
    • Select the packages you wish to install
  8. If you wish to install Metadata:
    • Toggle on the Metadata
    • Select a Comparison View
    • Leave checked or uncheck the ‘Rollback metadata deployment if some metadata fails‘ option

The ‘Rollback metadata deployment if some metadata fails‘ option will prevent the deployment of all metadata if some of the metadata deployment fails.

  1. If you wish to Install Data:
    • Toggle on the Data
    • Select a Data set or Deployment Plan
    • Leave checked or uncheck the ‘Prevent data deployment if metadata fails‘ option

The ‘Prevent data deployment if metadata fails‘ option will not allow any data to be deployed if the selected metadata deployment fails.

  1. Select ‘Create Scratch Org

Deleting a Scratch Org

Scratch Org creation has a daily limit of 6 orgs per day and only 3 active orgs at a time. Scratch orgs can be removed like environments by selecting ‘Remove Environment’ on the Environment Card (which will also remove the GUID mappings to the org). However, this will not remove the Scratch Org from Salesforce and therefore, will not free up an active org in the daily allowance. To remove the org from Salesforce follow these steps:

  1. Select the Scratch Org Environment Card
  2. Select ‘Remove Environment‘ at the bottom of the card
  3. Confirm you will loose your GUID mappings for the org by entering the name of the Environment
  4. Select the toggle to ‘Delete this Scratch Org
  5. Select ‘Remove