0

My global picklist on production (A) isn't being 'fully updated' with the global picklist from my sandbox (B) even thought B is being successfully deployed. The changes involve adding a new picklist value ('IPhone', but this value should be inconsequential) and removing the original default value.

I believe that the error is in the global picklist because of the reasons above, and because the apex code works just fine in the sandbox, but not in production and nothing has changed as far as I know so my best guess right now is that it's the global picklist.


There seems to be two contradicting things that are happening right now:

1) New Objects

As far as I can tell, two strange things are happening when creating a new object with a field that uses picklist A:

a) The original default value is still set

b) The IPhone option isn't visible in the picklist that drops down.


2) Setup

When I go into the setup and view the corresponding picklist for the object, however, I see 'IPhone' in the list and I also see that no original value is being set.

Also, I have some apex code that runs and is trying to set the value of a new instance of the object to 'IPhone' but it's giving me an error of

INVALID_OR_NULL_FOR_RESTRICTED_PICKLIST, bad value for restricted picklist field: IPhone


I'd really appreciate any and all help

1

Seems like you have record types on that object. I didn't see that you deployed record types and available picklist values for record types. In order to deploy picklist values for field you need to include the following elements in your change set:

  • GlobalValueSet (API version is 38.0 and higher) or GlobalPicklist in other case
  • Record Type
  • Field that uses deployed global picklist

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.