The Background
We are a super-sized Performance Edition organization with a number of enhanced limits, and migrating our "happy soup" to DX Unlocked packages.
We previously had problems creating some of our Unlocked Packages, and eventually came up with a configuration file that allowed us to create these packages.
The Configuration
Our config file used for all of the packages is as follows:
{
"features": [
"Communities",
"StateAndCountryPicklist",
"AddCustomRelationships:10",
"AddHistoryFieldsPerEntity:25"
],
"settings": {
"accountSettings": {
"enableAccountTeams": true
},
"orgPreferenceSettings": {
"networksEnabled": true
},
"nameSettings": {
"enableMiddleName": true,
"enableNameSuffix": true
}
}
}
The Problem
Now, we're trying to install these packages in to a Sandbox for testing purposes before we try to go live. The installer runs for about 5 minutes, then gives us the following installation error:
ERROR: Encountered errors installing the package!,Installation errors:
1) Custom Relationship Limit Exceeded, Details: Cannot create new relationship. Each object can have no more than 40 custom relationships, including Master-Detail and Lookup relationships.
The sandbox we're attempting to install to is a copy from production that should have the same "extra custom relationships" settings as production itself. The metadata for this Unlocked Package includes all of the custom relationships we need to successfully deploy the remaining packages.
Is this a current limitation of Unlocked Packages? How is it we're allowed to create packages we cannot install? Do I need to remove one or more fields from my package and/or sandbox to get this to work? All the new features suggests that we should be able to do this without too much difficulty, but the docs are not clear on how to proceed.
The Question
How do we, as a super-sized org, get our sandboxes and scratch orgs to work with our super-sized configuration Unlocked Packages?
Edit
Apparently, our org limits were reduced? Here's our current org limits, both in the Sandbox and Production. I'll need to follow up with Support.