I have an existing picklist on an existing custom object in a managed package. This package is already deployed and installed by users.
For the next release of my package, I have added a checkbox ("Sync Enabled") to this custom object and would like to set up the checkbox as the picklist's controlling field when the package is installed (for fresh installs and upgrades). I've had no issues setting up the checkbox as the picklist's controlling field in my development org:
and the right data shows up in the custom object's .object
("declarative metadata") file:
<fields>
<fullName>My_Picklist_Name__c</fullName>
<deprecated>false</deprecated>
<description>blah blah vlah</description>
<externalId>false</externalId>
<label>My Picklist Label</label>
<picklist>
<controllingField>Sync_Enabled__c</controllingField>
<picklistValues>
<fullName>Foo</fullName>
<controllingFieldValues>checked</controllingFieldValues>
<default>false</default>
</picklistValues>
<picklistValues>
<fullName>Bar</fullName>
<controllingFieldValues>checked</controllingFieldValues>
<default>false</default>
</picklistValues>
<picklistValues>
<fullName>Baz</fullName>
<controllingFieldValues>checked</controllingFieldValues>
<default>true</default>
</picklistValues>
<sorted>false</sorted>
</picklist>
<trackHistory>false</trackHistory>
<type>Picklist</type>
</fields>
However, when I upload a beta version of this package for testing, and install the package (in another Salesforce org) as an upgrade (not a clean install), the checkbox is added but it is not set as the picklist's controlling field:
This definitely works for clean installs:
Is there any way to make this work on a package upgrade? I have pored over pages of Salesforce documentation but have not been able to find anything useful.