8

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:

enter image description here

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:

upgrade does not work

This definitely works for clean installs:

clean install works

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.

2
  • Cross-posted to developerforce.com boards: boards.developerforce.com/t5/General-Development/…
    – Matt Ball
    Commented Mar 1, 2013 at 18:50
  • 1
    Pretty sure this is due to picklist metadata not updating on upgrades - instead it's used as defaults for new installs. This is arguably a feature (although not one I like) in that it allows customer customizations to persist through upgrades. Yes they could merge them, but field sets work that way and have a number of merge-related issues. Commented Mar 5, 2013 at 1:11

1 Answer 1

2

In short, no, you cannot push these types of upgrades in a managed package. Other limitations include updates to page layouts, related lists, tab settings, apps (default), and picklist values. While it is arguably a useful feature (prevents wiping out settings that administrators may have made post-install), it's definitely a pain point to keep track of manual updates that are required for each customer when upgrading their package.

1
  • Not satisfying, but not surprising, I suppose.
    – Matt Ball
    Commented Sep 14, 2013 at 20:11

You must log in to answer this question.

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