0

I have a custom Apex page(VisualForce Page) on the Lead Conversion Button Along with the controller and apex class for lead conversion

There is a picklist field [Picklist__c]on the lead which is a restricted field when converting the lead it gives me the following error:

ConvertLead failed. First exception on row 0; first error: INVALID_OR_NULL_FOR_RESTRICTED_PICKLIST, bad value for restricted picklist field: : [Picklist__c]

I have checked the API name and active values of the picklist they all are correct.

Unfortunately, I can't share my code here. Should I debug this field or anything else Suggestions are welcomed!

1
  • You need to provide more detail. Are you mapping that Lead picklist field to a field in the Contact or Opportunity? Does the target field have the same values as the Lead picklist field? Please edit your post to include these details. Commented Jul 27 at 17:39

1 Answer 1

0

You can go to Opportunity > RecordTypes and look for the [Picklist__c] in the Opportunity RecordType that produced the error. There are 2 columns to select the allowed values for that particular [Picklist__c] for that Opportunity RecordType

2
  • How do you know it is the Opportunity object? Couldn't it be the account or contact? What if there are no record types on the object? Commented Jul 27 at 17:40
  • Sorry @DavidCheng. You are right. However, for any objet the sequence to solve this error is the same. If there are not record types. Commented Jul 28 at 18:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .