1

To clarify I can create a scratch org where I can manually add a community I have setup the OrgPreference.settings and the features in project-scratch-def.json correctly. The problem is when I create a community pull back the metadata and try to create another scratch org with the updated metadata I get the following:

force-app\main\default\portals\Customer Portal.portal-meta.xml  Not available for deploy for this organization
force-app\main\default\networks\Test.network-meta.xml           Not available for deploy for this organization
4
  • I'm not sure what is in those files, but my guess would be that they contain e.g. the domain name and that can't be moved between orgs. We ended up doing quite a lot of scripting so we can automatically create a fully configured community org.
    – Keith C
    Jun 19, 2019 at 12:46
  • I don't see a reference to domain in them, but I'm starting to think its not possible. Really I just want a test community so that I can test partner users but partner users need a profile associated with a community. Jun 19, 2019 at 13:18
  • can you post your 2nd scratch org project-scratch-def.json file settings
    – sdandamud1
    Jun 19, 2019 at 14:19
  • { "orgName": "Demo Company", "edition": "Developer", "features": ["Communities"] } Jun 19, 2019 at 15:08

1 Answer 1

2

You need to explicitly activate the community on the scratch org definition file to be able to deploy a community. Check the communitiesSettings attribute below:

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

You must log in to answer this question.

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