4

Is there a way to enable Partner Community User Licenses in scratch org? While trying to deploy Partner Community profiles, we get the following errors.

In field: userLicense - no UserLicense named Partner Community found

I've added Communities and NetworkdEnabled in Scratch Definition file. I still cannot see Partner Community licenses in the Scratch Org.

Read up something on another post related to this, suggesting that if we changed the Edition of the scratch org as "Developer" then those licenses are added by default, however, then we get loads of other errors while deploying.

Any other suggestions/workarounds are welcomed.

Thanks

1

Use a Developer edition scratch org

{
  "orgName": "My Dev Scratch Org",
  "description": "",
  "language": "en_US",
  "edition": "Developer",
  ....
}

You will get the following licences

|          License Type         | Number of licenses |
|:-----------------------------:|--------------------|
| Customer Community            | 5                  |
| Customer Community Login      | 5                  |
| Customer Community Plus       | 5                  |
| Customer Community Plus Login | 5                  |
| Partner Community             | 5                  |
| Partner Community Login       | 5                  |
0

Use below configuration:

{
  "orgName": "Your Org Name",
  "edition": "Enterprise",
  "features": ["Communities", "PartnerCommunity", "ForceComPlatform"],
  "settings": {
    "orgPreferenceSettings": {
      "networksEnabled":true,
      "ChatterEnabled":true
    }
  }
}

Replace CustomerCommunityPlusLogin with any Customer/Partner Community License name like CustomerCommunityPlus, GoldPartner, PartnerCommunityLogin etc.

1
  • Nikhil, I prefer this option over the idea of creating a Dev scratch org (because I want to match the edition of my target environment as closely as possible). However, you reference a feature "PartnerCommunity", but I don't see that listed as a valid Scratch Org Feature here: developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/… Also, you indicate to replace "CustomerCommunityPlusLogin" with ... other stuff, but your config sample doesn't list "CustomerCommunityPlusLogin". Can you edit/clarify your config sample?
    – JP Seabury
    Sep 30 '20 at 15:04
0

Here is a scratch org definition that works.

{
    "orgName": "Developer Edition with Partner",
    "edition": "Developer",
    "hasSampleData": "true",
    "features": ["Communities","PartnerCommunity","PersonAccounts"],
    "settings": {
            "lightningExperienceSettings": {
                    "enableS1DesktopEnabled": true
            },
            "mobileSettings": {
                    "enableS1EncryptedStoragePref2": false
            },
            "communitiesSettings": {
                    "enableNetworksEnabled": true
            },
            "experienceBundleSettings": {
                    "enableExperienceBundleMetadata": true
            }
    }
}

I was trying to verify that an org can have both partner account and person account.

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.