9

We've got a public Site.com in our org. When converting and migrating from MDAPI to DX, I noticed even though all the components related to the site were converted and deployed, we still have to go and manually register a Salesforce Site Domain for each of the scratch orgs before we can use the public Site.

Is there a way to automate this as part of the scratch org definition? Reading through the docs nothing stands out.

4

It looks like 4 things are required in the scratch org config in order to avoid this issue and get the domain automatically registered.

{
  "orgName": "test org",
  "edition": "Developer",
  "features": [
    "Communities",
    "Sites",
    "SiteDotCom"
  ],
  "settings": {
    "orgPreferenceSettings": {
      "networksEnabled": true
    }
  }
}
2
  • 1
    For some reason, this doesn't work with Enterprise edition. Not sure why - will pursue this with Wade. – metadaddy Aug 29 '19 at 16:36
  • Good to know. Please let me know the outcome and I'll update my answer – Boris Bachovski Aug 30 '19 at 0:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.