You need to sign in to do that
Don't have an account?
Thomas 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>
<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>
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.