Creating Scratch orgs
You can easily Create Scratch org using one of the following ways:
- the toolbar of the Organizations Manager panel,
- the context menu of Dev Hub in the Organizations manager panel.
After using this option, you will see the following wizard, which will guide you through the process of the creation of a scratch org.
All the options at the first step of the wizard are passed to the
force:org:create CLI command:
- Alias — the short name (or alias) of a scratch org that you are creating. Passed to the CLI as the
-a | –setaliasargument,
- Active lifetime of the scratch org — time period in days, from 1 till 30, when the scratch org will be active,
- Create scratch organization with no namespace — creates a scratch org with no namespace. This would be useful when using a scratch org to test installations of packages with namespaces. Passed to the CLI as the
-n | –nonamespaceargument,
- Set the created organization as the default — sets the created org as the default username. Translates into the
-s | –setdefaultusernameargument.
Additionally, you have one of the four options to select what a scratch org configuration should be used:
- Create by Edition creates a scratch org of a selected edition with a default configuration. This option is selected by default,
- Configure manually option will lead you to the second step of the wizard where you will be able to configure different parameters of a scratch organization,
- Select configuration file path option allows you to select manually a json file that you'd like to you as a scratch org definition,
- Use from project option gives you an ability to select a default scratch org definition file from one of the opened Salesforce DX projects.
In a case when you have selected manual configuration of the scratch org, on the next step you will see the following window:
On this step, you are able to configure the following parameters for the Scratch org:
- Org definition section contains general parameters that are required for an org creation. You need to fill all the fields in this section.
- Org preferences section contains various preferences of the organization, like what functionality is available. Please note that checkboxes in this category have 3 states - enabled, disabled and default.
- Set add-on features section allows you to select additional features to be enabled for the organization.
Once you finish with all the settings for the organization and press the Next button, the IDE will call the
force:org:create command with selected attributes and, if succeeded, will additionally call the
force:org:display command to show you the properties of your new organization.
In this section:
This also may be useful: