3

Hi can any one tell how to create a developer org using Salesforcedx CLI?

What i tried:

I used the following command

sfdx force:org:create  --definitionfile  config\workspace-scratch-def.json --setalias my-scratch-org

and workspace-scratch-def.json contains the config file for scratch org as follow

{
"Company": "Acme",
"Country": "US",
"FirstName":"ScratchOrg",
"LastName": "Lastname",
"Email": "[email protected]",
"Edition": "Developer",
"Features": "MultiCurrency;API;AuthorApex;CustomTabs;CustomApps;ForceComPlatform",
"OrgPreferences": {
      "S1DesktopEnabled": true,
      "ChatterEnabled": false
   }
}

whenever I create a scratch org by using this config file and open using force:org:open it opens a sandbox and in that I'm not getting create package options. If I create a org using create org button in Environment hub it creates a developer org but not a scratch org and here I'm getting create package option. enter image description here

please suggest me where I'm doing wrong.

1 Answer 1

6

Scratch orgs are not intended to be the packaging org for ISVs from what I've gleaned from the DX product team. The intended use case for a scratch org has always been (to use a phrase I've heard) "your local development environment, in the cloud."

How's that for a bit of clever word play.

But it does capture the intended usage. I create a scratch org to work on a feature as a developer. I create the code, test code, and other configs to support the feature. Once I'm done, I check it into source. From there the feature code/metadata should go to a sandbox, or in your case, a partner DE org.

From there you would have integration testing, packaging, etc.

You have also discovered that all scratch orgs live on sandbox instances. I'm not sure if this is a limitation of sandbox instances. This is independent from the shape of the org (the stuff defined by the config JSON file like Edition, and other features that are enabled). So the org you created is definitely a DE org. It is just hosted in a sandbox instance...something new in the world of Salesforce DX, I believe.

I do not work for an ISV (I work for Salesforce), nor am I on the Salesforce ISV team. So this is very much me gleaning what I know about DX and what I know anecdotally about the ISV workflow. But I am pretty certain that the scratch org itself was never intended to be the packaging org in the ISV use case.

1
  • can you tell me what is the difference between the org created using create org button in environment hub and the scratch org created in sfdx command.
    – Safiya PV
    Commented May 10, 2017 at 10:26

You must log in to answer this question.

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