2

I have a managed package that contains a picklist with some values (static values -not global). As my solution expanded I added a new value to this picklist, and created a beta package. After installing the beta package in a sandbox org I noticed the new value was absent.

Everything works as expected if the package is installed in a fresh org.

UPDATE
At first I thought I ran into this issue because the beta package was installed on top of its non-beta predecessor. But I just got the same issue upgrading to a non-beta managed release.

1

I just ran into the same issue. A new picklist value was added to a field and then deployed via a non-beta managed package update.

After the new package was installed the picklist value wasn't present.

The question I have a managed package, if I add values a picklist, will my customers get it on an upgrade? addresses it.

From the current answers, there was a change in Winter '18 that would have addressed it, but it was pulled before release.

This section from the release notes seems applicable still (as at Summer '19):

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

| improve this answer | |
0

A few notes

  • New values are added to subscriber org on package upgrade.
  • Values you removed from the package are NOT removed from the subscriber
  • Values added by subscriber are not modified on upgrade

Do you have record types on the object?

When you do add a new pick list value and you have record types you will need to edit the record type pick list to include the new values installed by the package

| improve this answer | |
  • There are no record types on the object. I'm not sure if this makes any difference but the field is a controlling picklist. – Mossi May 11 '17 at 0:47
  • @Mossi - Did you check the field itself on the object configuration to see if the value is there? Also, a beta install is just like a new install. Is the field you added the value to a custom field? – Eric May 11 '17 at 0:48
  • Yes. The new value is not there in the subscriber org. – Mossi May 11 '17 at 0:49
  • Is the field you added the value to a custom field? If so, double check to ensure you added it to the package...Its a pretty binary process. Field in package, field in subscriber org. The fact that it is not even in the field definition makes me think you either added to standard field or did not package it – Eric May 11 '17 at 0:50
  • 1
    Did you get a chance to play around with this? I just discovered this problem surfaces when the package is upgraded to a non-beta version as well! So beta or not, the issue is there. – Mossi May 27 '17 at 23:52
0

Reading an other post in stackexchange, it seems that the new picklist values are not added when the package is upgraded, so my recommendation is why not to try adding the field value in a post install script? I may warn you that that seems not to be easy, here is a blog that explains how to do it: https://andyinthecloud.com/2014/07/29/post-install-apex-metadata-api-configuration-solved/.

If the previous approach doesn't work you may have to add some notes to the post install notes instructions explaining the actions that the user must take in order to add the new picklist values.

The other post: Managed package Picklist fields

Post install script: https://developer.salesforce.com/docs/atlas.en-us.packagingGuide.meta/packagingGuide/apex_post_install_script_create.htm

| improve this answer | |
0

Few challenges which I encountered during the upgrading of a package for picklist:

  • New Picklist Value does not get added.
  • Change in default Picklist Value.

The only solution is, either the post-deployment activity or reinstalling the package, Or have some scripting logic that automatically does for you.

I also faced the same challenges with : Field History Tracking

Changes made for Field History Tracking and Default Picklist value are updated in the source(Scratch org) but it is not getting reflected on the target org after package version installation. I noted it down for post-deployment activity.

| improve this answer | |

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.