4

In the Salesforce DX Developer Guide, there is a list of Supported Features and Preferences that can be activated in Scratch Orgs through the Scratch Org Definition file.

I can see the description of the Settings in the Metadata API Developer Guide, as well as a way to retrieve these for an existing org.

However, I don't know how to get the values defined for the Features for a specific org. Is there a way to get them using an API, to know what should be set in my definition file to match a specific org ?

The features listed in the DX doc is the following one:

Supported Features
You can enable these add-on features in a scratch org:

 - API 
 - AuthorApex 
 - Communities 
 - ContractApprovals 
 - CustomerSelfService 
 - CustomApps 
 - CustomTabs 
 - ForceComPlatform 
 - MultiCurrency 
 - PersonAccounts 
 - SalesWave 
 - SControls 
 - ServiceCloud
 - ServiceWave 
 - Sites
1
  • This is one of the first questions I have now as we join the SalesForce community and begin setting up our development environment. I know our lead power-user is going to want to turn on a bunch of features in an org (maybe I should have her start in a scratch org). So, if I cannot cull that data into a definition file with a CLI command, can I instead pull that into a default package that we establish as a base install for any future development scratch orgs we create? (we are a greenfield company starting with 2GP development)
    – bkwdesign
    Jun 7, 2019 at 19:15

1 Answer 1

1

There are a number of things coming back from the Tooling API since the beta launch of SalesforceDX.

enter image description here

Many of them have the 0HE keyprefix of a SettingsTemplate.

Of particular interest is OrganizationSettingsDetail. I'd provide a link to the documentation for it, but I can't currently find it. It does however contain a number of the settings that can shape an org.

enter image description here

It's also all through the source code from the sfdx command line around orgPrefRegistry.js and scratchOrgApi.js.

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .