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 Commented Jun 9, 2021 at 14:11
  • 1
    Thank you @Swetha, the work around worked. Commented Jun 9, 2021 at 14:17
  • Thanks for confirming @Alex. I have posted this information as an answer so it might help others too Commented Jun 9, 2021 at 14:22
  • We see this problem with a non-Communities scratch org definition too.
    – Keith C
    Commented Jun 9, 2021 at 17:22
  • 1
    Thanks @Swetha. Bit more info here salesforce.stackexchange.com/questions/346489/….
    – Keith C
    Commented Jun 9, 2021 at 19:52

1 Answer 1

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
    Commented Aug 13, 2021 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 Commented Aug 13, 2021 at 12:29

You must log in to answer this question.

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