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
Jennifer.SchnellJennifer.Schnell 

Custom Lead Convert Button - JavaScript - Picklist field type

We have a requirement that Industry and AnnualRevenue fields are not blank on lead conversion.  I am creating a custom javascript button for this so it warns the user before they get to the default convert page, however I am running into an issue because the industry field is a picklist.  Is this still possible?

Here is the javascript I have:  https://gist.github.com/JennSchnell/999b40a95c79d6365375965ac283e673
Marcelo CostaMarcelo Costa

Hi Jennifer...
I guess in this case, the best approach would be a validation rule and setting the "Require Validation for Converted Leads" is set in the Lead settings.

This is a similar case: https://success.salesforce.com/answers?id=90630000000DRPCAA4
Good luck :)

Jennifer.SchnellJennifer.Schnell
Hi Marcelo,
Thanks for the reply and case reference.  I tried a VR rule first, but we have validation on Tasks that seem to be getting in the way, so I thought using a JavaScript button would be a good alternative, until I ran into the picklist issue. We do have the "Require Validation for Converted Leads" turned on.