What do you need help with?

Salesforce DX: Scratch Org Creation

Follow

Creating scratch orgs

Scratch orgs can be created by clicking on button Create Scratch Org (Fig 1.1)

Screen_Shot_2018-10-03_at_10.29.28_AM.png

After that the page for creating scratch org will be opened (see the next chapter)

Note: If the chosen org does not have a Dev Hub feature, an error will say “Scratch orgs can be created only on Dev Hub org”. Dev Hub available only in: Enterprise, Performance, and Unlimited Editions. If the chosen org is from that set, it’s necessary to check that Dev Hub feature has been enabled on this org:

  1. From Setup, enter Dev Hub in the Quick Find box and select Dev Hub.

  2. To enable Dev Hub, click Enable.

 

Main page to create scratch orgs

After opening this page the Flosum automatically authorizes and check the availability of Dev Hub feature:

Screen_Shot_2018-10-03_at_10.34.12_AM.png

This is a short summary of all available settings:

Field’s name

Description

Scratch Org Name

Required field. Defines the name of scratch org.

Country

Defines the locale of scratch org. The default value is United States.

Language

Defines the language for the scratch org. The default language is English.

Description

Here one can specify some details about scratch org for documentation purpose.

Admin's Email

Required field. Specify the admin’s email for scratch org. If this value is empty, the Dev Hub’s admin email will be set.

NOTE: by default all newly created scratch orgs have a rather strict security settings. For example, in order to log in to them user has to provide check code emailed to admin’s email. That is why user has to type here the email which he has the access to.

Scratch org password

Required field. The password to scratch org. By default all new scratch orgs have an empty password, and it’s necessary to reset it. Password must combine letters and numbers (the requirement of Salesforce)

Namespace

The namespace prefix that you want to link to the scratch org.

Available values for this field can be picked up from the set which defined by records of object Namespace registries. (see the chapter Linking new namespaces about how to add a new namespace to Dev Hub org)

Edition

Available values for this picklist: Developer, Enterprise, Group or Professional.

Add sample data

Select this checkbox if it’s necessary to create a scratch org with some sample data (Account, Contact records, etc)

Features section is used to enable some add-on features in a scratch org. Available values are:

  • AuthorApex
  • Communities
  • ContractApprovals
  • CustomerSelfService
  • CustomApps
  • CustomTabs
  • DebugApex
  • DefaultWorkflowUser
  • ForceComPlatform
  • MultiCurrency
  • PersonAccounts,
  • SalesWave
  • LightningSalesConsole
  • LightningServiceConsole
  • ServiceCloud
  • ServiceWave
  • SiteDotCom
  • Sites

After settings all parameters click on button Create Org. Org’s creation takes some time, normally about 20-30 seconds. After successful creation the scratch org will be registered in Flosum’s database, and user will be redirected to details page of new Scratch Org record.

One can manually log in to scratch orgs: use the Username from Org__c record and password which has been typed on the first step. By default all scratch orgs are created on test.salesforce.com domain.

Note: password to scratch org is not saved anywhere. 

 

Linking new namespaces

All available namespaces which can be set for scratch org must be registered at Dev Hub org. The details about namespace (its prefix, and the org ID of the Developer Edition org where you've registered the namespace you want to link) are held in object NamespaceRegistry. User can’t create this object with the API. Navigate to the Namespace Registry tab and click the 'Link Namespace' button to insert a NamespaceRegistry record (Fig. 3.1, 3.2). All registered namespaces become available for choosing as namespace for scratch org on Flosum side.

Print Friendly and PDF
Was this article helpful?
0 out of 0 found this helpful

Comments