Enable Dev Hub
Prodly requires users to have Dev Hub enabled before creating a Scratch Org. Follow these steps to enable Dev Hub:
- Visit ‘Setup’ in your Control Org
- Use the Quick Find Box to search for ‘Dev Hub’
- 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:
- Login to your Source org
- Visit Setup
- Search for ‘Org Shape’
- Select the toggle for ‘Enable Org Shape for Scratch Orgs’
- List your 15 digit control org Id (Dev Hub must be enabled in your control org)
- Select ‘Save‘
Create a Scratch Org
Once an Dev Hub is enabled, users can create a Scratch Org by following these steps:
- Visit the Release Tab
- Select ‘Create Scratch’
- Add a Name
- Add a Username
- Select a Source
- Select a Duration
- If you wish to install packages:
- Toggle on the Installed Packages
- Select the packages you wish to install
- 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.
- 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.
- 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:
- Select the Scratch Org Environment Card
- Select ‘Remove Environment‘ at the bottom of the card
- Confirm you will loose your GUID mappings for the org by entering the name of the Environment
- Select the toggle to ‘Delete this Scratch Org‘
- Select ‘Remove‘