5

I have a picklist field which is came from managed package with some values. I want to remove those values and add my own values in that field(Which I am able to do it).

My Question is, whenever the managed package get updated, will it override with the values of package or will it keep my values only?

| improve this question | | | | |
5

When you upgrade the managed package, the pick list values that you as a subscriber remain. New pick list values from the package are added to the pick list but not the record type available pick list options, you will have to do that manually.

I wanted to know for sure the answer to the second part of this question as well so I tested it as follows:

  1. Org with v4.20 package installed
  2. Changed an existing pick list value to something of my choosing
  3. Upgraded the package v4.40

Results:

  1. Picklist edit stayed the same
  2. The original value did not reappear
  3. New pick list values as a part of the package were added

From the documentation:

Picklist field values for custom fields can be added, edited, or deleted by subscribers. A developer should carefully consider this when explicitly referencing a picklist value in code. Picklist values can be added or deleted by the developer. During a package upgrade, no new picklist values are installed into the subscriber’s organization for existing fields. Any picklist values deleted by the developer are still available in the subscriber’s organization.

So the values in a pick list are versioned and the new values can be added in the subscriber org but the previous values are left as edited by the subscriber. From the subscriber point of view only new values are added...

| improve this answer | | | | |
  • perfect... Updated package and check it. :) – KSL Aug 20 '16 at 1:43
1

My experience has been that new values added to a managed picklist field in the packaging org don't automatically appear in the subscriber org when they update to the new package version (as at Summer '19).

There appears to have been a change to this behavior as part of the Winter '1 release, but it was pulled before it reached production. See I have a managed package, if I add values a picklist, will my customers get it on an upgrade?

This quote from the release notes about the pulled feature describes my current experience:

...managed package upgrades could not add new picklist values in subscriber orgs without post-deployment steps.

I'm currently not sure why my experience differed from Eric's, but the new picklist values definitely weren't there after the upgrade.

| improve this answer | | | | |
1

We encountered this problem while adding a new field into our package. This is Salesforce official comment: "Yes, as mentioned by you it is a limitation. Any new packaged picklist values will need to be either manually added after the upgrade or created via a postinstall script with the Metadata API." https://partners.salesforce.com/partnerCaseDetails?Id=5000M00000s2tgvQAA

| improve this answer | | | | |
-3

First thing you can't edit the Picklist values which is in Managed Package. You can add other values except picklist values by the Apex in the records. When your package get updated then it will override the picklist with the new package picklist but not override the records.

| improve this answer | | | | |
  • HI, I am not editing any values and I am adding new values. Thanks Tarachand :) . Seems like I need to create new field with my own values and use it for my implementation – KSL Aug 17 '16 at 13:00
  • Yes you have to create a custom field . The second solution is if package is in your hand then you can change the picklist in the packaging org and again upload the package. – Tarachand Karwal Aug 17 '16 at 13:04
  • 1
    This answer is just completely incorrect. 1. You can edit pick list values in a managed package. 2. Upgrading a package does not overwrite the value added by the subscriber – Eric Aug 17 '16 at 13:36
  • Sorry for my misunderstanding. Eric is right. – Tarachand Karwal Aug 17 '16 at 13:45

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.