ScratchOrgInfo

Represents a scratch org and its audit log. Use this object to create a scratch org and keep a log of its creation and deletion.

Introduced in API version 40.0.

create(), delete(), describeLayout(), describeSObjects(), getDeleted(), getUpdated(), query(), retrieve(), update(), upsert()

  • Type: email
  • Properties: Create, Filter, Group, Nillable, Sort
  • Description: The email address of the scratch org’s Administration user. The read only SignupEmail field is populated with this value. If you don’t provide a value for AdminEmail, the field is left blank and the SignupEmail is populated with the email address of the org user who is creating this object.
  • Type: textarea
  • Properties: Create, Nillable, Update
  • Type: string
  • Properties: Filter, Group, Nillable, Sort
  • Description: A one-time authorization code that can be exchanged for an OAuth access token and refresh token using standard Salesforce APIs. It’s used with ConnectedAppCallbackUrl and ConnectedAppConsumerKey, when the specified connected app hasn’t been configured with an X.509 certificate. This field is read only.
  • Type: textarea
  • Properties: Create
  • Description: Required. When used with ConnectedAppConsumerKey, it specifies the callback URL used for OAuth. If using Salesforce CLI, the default is http://localhost:1717/OauthRedirect.
  • Type: string
  • Properties: Create, Filter, Group, Sort
  • Description: Required. When used with ConnectedAppCallbackUrl, it specifies the connected app that is approved automatically during scratch org creation. If using Salesforce CLI and the default connected app, indicate PlatformCLI.
  • Type: string
  • Properties: Create, Filter, Group, Nillable, Sort
  • Description: The two-character, upper-case ISO-3166 country code. You can find a full list of these codes at several sites, such as: www.iso.ch/iso/en/prods-services/iso3166ma/02iso-3166-code-lists/list-en1.html. The language of the scratch org is auto-determined based on the value of this field. If you don’t specify a value, this field defaults to the Dev Hub’s country code.
  • Type: string
  • Properties: Filter, Group, Nillable, Sort
  • Description: The user who requested that the scratch org be deleted. This field is read only.
  • Type: date
  • Properties: Filter, Group, Nillable, Sort
  • Description: The date when the DeletedBy user requested that the scratch org be deleted. This field is read only.
  • Type: textarea
  • Properties: Create, Nillable, Update
  • Description: A free-form text field for you to enter a description of this scratch org.
  • Type: int
  • Properties: Create, Filter, Group, Nillable, Sort
  • Introduced: API version 41.0
  • Description: Number of days after which the scratch org expires. Valid values are 1–30. The default is 7.
  • Type: picklist
  • Properties: Create, Filter, Group, Nillable, Restricted picklist, Sort
  • Description: Required if you don’t provide Snapshot or SourceOrg. The org edition of this scratch org. Valid values are Group, Developer, Enterprise, and Professional.
  • Type: string
  • Properties: Filter, Group, Nillable, Sort
  • Description: The error code if the scratch org creation isn’t successful. This field is read only.
  • Type: date
  • Properties: Filter, Group, Nillable, Sort
  • Description: Date when the scratch org expires. This field is read only.
  • Type: textarea
  • Properties: Create, Nillable
  • Description: A semi-colon delimited list of the features enabled in this scratch org, such as MultiCurrency. See the Salesforce DX Developer Guide for the full list of valid features.
  • Type: boolean
  • Properties: Create, Defaulted on create, Filter, Group, Sort
  • Introduced: API version 41.0
  • Description: Specifies whether the scratch org contains sample data. If set to true, the sample data is similar to the data in a Salesforce free trial org.
  • Default value: false
  • Type: string
  • Properties: Create, Filter, Group, Nillable, Sort
  • Type: boolean

  • Properties: Create, Defaulted on create, Filter, Group, Sort

  • Default value: false

  • Type: picklist

  • Properties: Create, Filter, Group, Nillable, Restricted picklist, Sort

  • Description:

    The language of the scratch org being created. Specify the language using a language code listed under “Supported Languages” in Salesforce Help. For example, use zh_CN for simplified Chinese. The value you select overrides the language set by locale.

    If you don’t specify a value, the language is based on the Country used during scratch org creation. If you don’t specify a value for Country, the value defaults to the Dev Hub’s country.

  • Type: date
  • Properties: Filter, Group, Nillable, Sort
  • Description: The date of the last user login to the scratch org. This field is read only.
  • Type: textarea
  • Properties: Nillable
  • Introduced: API version 44.0
  • Description: A URL that logs you in to the scratch org. This field is read only.
  • Type: string
  • Properties: Autonumber, Defaulted on create, Filter, idLookup, Sort
  • Description: The auto-generated ID of this scratch org. This field is read only.
  • Type: string
  • Properties: Create, Filter, Group, Nillable, Sort
  • Description: The namespace you want to associate with this scratch org. The value of this field corresponds to the NamespacePrefix field of the NamespaceRegistry object that describes your namespace.
  • Type: string
  • Properties: Create, Filter, Group, Sort
  • Description: Required. The name of the scratch org. This name appears as the Organization Name in the Company Information Setup page.
  • Type: textarea
  • Properties: Create, Nillable
  • Type: picklist

  • Properties: Create, Defaulted on create, Filter, Group, Nillable, Restricted picklist, Sort

  • Introduced: API version 46.0

  • Description:

    The release of the scratch org. During Salesforce’s major release transitions, this field allows you to select the Salesforce release version, based on the version of your Dev Hub. Valid values are:

    • Current
    • Preview
    • Previous

    See Select the Salesforce Release for a Scratch Org for more information.

  • Possible values:

    • Current — Current
    • Preview — Preview
    • Previous — Previous
  • Type: string
  • Properties: Filter, Group, Nillable, Sort
  • Description: The org ID of the scratch org. This field is read only.
  • Type: string
  • Properties: Filter, Group, Sort
  • Description: The country code of the scratch org. This field is populated with the value of the Country field. If you didn’t provide a value for Country, it’s the country code of the Dev Hub. This field is read only.
  • Type: email
  • Properties: Filter, Group, Sort
  • Description: The email address of the scratch org’s Administration user. This field is populated with the value of the AdminEmail field. If you didn’t provide a value for AdminEmail, it’s the email address of your user in the Dev Hub. This field is read only.
  • Type: string
  • Properties: Filter, Group, Nillable, Sort
  • Description: The Salesforce instance on which this scratch org resides. This field is read only.
  • Type: picklist
  • Properties: Filter, Group, Restricted picklist, Sort
  • Description: The language of the scratch org. This field is populated with the value of the Language field. If you didn’t provide a value for Language, it’s the language of the Dev Hub. This field is read only.
  • Type: int
  • Properties: Filter, Group, Nillable, Sort
  • Description: The number of days between the scratch org’s creation and expiration. This field is read only.
  • Type: string
  • Properties: Filter, Group, Sort
  • Description: The username of the Administration user of this scratch org. This field is populated with the value of the Username field. If you didn’t provide a value for Username, the value of this field is auto-generated. This field is read only.
  • Type: string

  • Properties: Create, Filter, Group, Nillable, Sort

  • Introduced: API version 44.0

  • Description:

    If this scratch org was created from a scratch org snapshot, then this field contains either the name or ID of the snapshot. Specifically, the name corresponds to the Name field of the snapshot’s record in the OrgSnapshot standard object; the ID corresponds to the record ID.

    If this scratch org wasn’t created from a snapshot, this field is empty.

    If you specify Snapshot, you can’t specify Edition or SourceOrg.

  • Type: string
  • Properties: Create, Filter, Group, Nillable, Sort
  • Introduced: API version 41.0
  • Description: The ID of the org whose shape (features, settings, limits, and licenses) information is used for creating scratch orgs. If you specify SourceOrg, you can’t specify Edition or Snapshot.
  • Type: picklist
  • Properties: Defaulted on create, Filter, Group, Restricted picklist, Sort
  • Description: The status of the scratch org, such as active, expired, or deleted. This field is read only.
  • Type: string
  • Properties: Create, Filter, Group, Nillable, Sort
  • Type: string
  • Properties: Create, Filter, Group, Nillable, Sort
  • Description: The username of the Administration user of this scratch org.

This object has the following associated objects. If the API version isn’t specified, they’re available in the same API versions as this object. Otherwise, they’re available in the specified API version.