You need to sign in to do that
Don't have an account?

Validation around Converting Leads
Has anyone come up with code to override the Convert Lead button so that it can only execute when certain fields within the Lead record have been completed?
You need to sign in to do that
Don't have an account?
We have a piece of code in place that looks to see if the customer already exists or not - if not, it does not allow you to complete the conversion. I don't know how familiar you are with scontrols but I'd imagine you would do a javascript with the following logic:
IF Lead.fieldvalue1 == somestring
then
URLFOR($Action.Lead.Convert etc)
else
Error Message alert
URLFOR($Action.Lead.View.LeadID)
This would take the user back to the lead they tried to convert unless the condition in the IF statement is met.
{!IF(ISPICKVAL( Lead.Industry , 'TBD'), URLFOR( $Action.Lead.View , Lead.Id), URLFOR($Action.Lead.Convert, Lead.Id ) )}
This (ideally) would just kick the user back to the Lead View screen if true, otherwise bring them to the Lead Convert screen. Is this even close?
I know this isn't all I have to do, so I'm here to ask what to do next.... I have no clue. I have this s-control created, now what?
(I know I'll need to add some error message as to why they couldn't convert the lead too, but baby steps here...)
Thanks.
Once it is activated go to: