function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Thomas MonsonThomas Monson 

Insert failed. First exception on row 0; first error: INVALID_OR_NULL_FOR_RESTRICTED_PICKLIST,

I am using apex:selectList to display a multiselect list as a dropdown.  It works fine until i set multiselect to true then i get the error Insert failed. First exception on row 0; first error: INVALID_OR_NULL_FOR_RESTRICTED_PICKLIST,  when i try to save.  any suggestions?

<apex:selectList value="{!singleCon.DDMS__c}" styleClass="form-control" multiselect="true">
                                                                    <apex:selectOption itemValue="1" itemLabel="3"/>
                                                                    <apex:selectOption itemValue="2" itemLabel="2"/>
                                                                </apex:selectList>
FearNoneFearNone
hi thomas,

it means that either itemValue 1 or 2 is not in the picklist... try to check the singleCon.DDMS__c if it has 1 or 2.