One or more of the option values for this picklist are not in the range of allowed values in CRM 4

Hi,

I started getting this issue on one of our entities while saving it.

This wasn’t the issue in CRM 3.0, this issue came up only after upgrading to CRM 4.0.

I was sure that the issue is because of some picklist getting filled up with dynamic options. But what was surprising was it was working perfectly fine in CRM 3.0.

After looking for it , i realized that the above error only comes in CRM 4.0, in CRM 3.0, it doesn’t throw error and we are also able to save the form.

So i thought of trying out these two options for correcting the error in CRM 4.0,

1) Dynamically disabled the field using JavaScript on the onSave and enabling it on onLoad. Disabled field’s value wouldn’t be passed to the CRM Platform so i thought this would resolve my issue. For update it worked, however it didn’t work for new form.

2) Than i thought of writing a plugin that on pre create or pre update event would remove the picklist field from being passed as an inputparameter to the CRM Platform. However the error showed up before we could even reach the pre-create plugin.

So finally added few options through customization section and on the onload removed that option using DeleteOption for the picklist. And than i was able to work with that picklist properly and was also able to solve the form

bye.


Author: Nishant Rana

I love working in and sharing everything about Microsoft.NET technology !

Share your thoughts

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s