3

I am following the steps listed here Build scratch org definition file in order to enable communities for a scratch org, but the following error is received:

We couldn't find a template with the ID specified in the scratch org definition. If you’re sure the ID is correct, contact Salesforce Support.

This is my scratch org definition file:

{
"orgName": "Demo",
"edition": "Developer",
"features": ["Communities"],
"settings": {
    "lightningExperienceSettings": {
        "enableS1DesktopEnabled": true
    },
    "communitiesSettings": {
        "enableNetworksEnabled": true
    }
}

}

I can create standard scratch orgs, but for some reason is failing for communities, tried changing the edition to "Enterprise". My sourceApiVersion for this project is 49.0.

I can not find this error in the list of known issues for Scratch Orgs listed here: Scratch Org Error Codes. Hoping to find answers here before contacting support. Thanks!

7
  • 2
    Looks related to ongoing known issue trailblazer.salesforce.com/… .Try workaround of using "release": "Previous" in your project-scratch-def.json and confirm if that works for you.Thanks
    – Swetha
    Jun 9 at 14:11
  • 1
    Thank you @Swetha, the work around worked. Jun 9 at 14:17
  • Thanks for confirming @Alex. I have posted this information as an answer so it might help others too
    – Swetha
    Jun 9 at 14:22
  • We see this problem with a non-Communities scratch org definition too.
    – Keith C
    Jun 9 at 17:22
  • 1
    Thanks @Swetha. Bit more info here salesforce.stackexchange.com/questions/346489/….
    – Keith C
    Jun 9 at 19:52
6

The issue you are facing is related to ongoing Known issue. Our Salesforce Team is working to fix it.

The workaround would be to switch to previous release by using "release": "Previous" in your project-scratch-def.json so that it would enforce the scratch org creation in previous release for time being.

Example

{
"orgName": "MyCompany",
"edition": "Developer",
"release": "Previous",
"features": ["Communities", "ServiceCloud", "Chatbot"],
"settings": {
"communitiesSettings": {
"enableNetworksEnabled": true
}
},
"objectSettings": {
"task": {
"defaultRecordType": "default"
}
}
}

Or use

sfdx force:org:create -s -f config/project-scratch-def.json -a myPrevious -v acmDevHub -d 30 release=Previous

UPDATE: The issue has been fixed for all the affected orgs and known issue has been updated to reflect the same

2
  • Is this still on-going?
    – Phil W
    Aug 13 at 12:11
  • 1
    @PhilW The issue is resolved and the fix has been rolled out already. I will update my answer to reflect the same. Thank you
    – Swetha
    Aug 13 at 12:29

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.