You need to sign in to do that
Don't have an account?
Minky Hyun
I get OnClick Javascript error that reads "ISPICKVAL is not defined"
I have OnClick Javascript code on a custom Convert button on a Lead page that I'm trying to modify by adding another check, but I got this error. What am I doing wrong?
***************************
if((ISPICKVAL( Check_Box_c=false)))
{
alert('Checkbox must be checked before proceeding');
}
if('{!Lead.Status}'!='Qualified')
{
alert('Status should be Qualified to convert the Lead');
}
else
{
window.location.href='/lead/leadconvert.jsp?retURL={!Lead.Id}&id={!Lead.Id}'
}
***************************
if((ISPICKVAL( Check_Box_c=false)))
{
alert('Checkbox must be checked before proceeding');
}
if('{!Lead.Status}'!='Qualified')
{
alert('Status should be Qualified to convert the Lead');
}
else
{
window.location.href='/lead/leadconvert.jsp?retURL={!Lead.Id}&id={!Lead.Id}'
}
Replace the above line for the checkbox field
All Answers
Replace the above line for the checkbox field
When I click the "Convert" button, even though the first "if" statement is true, i.e. the checkbox is unchecked, I don't get the message. The message for the 2nd if statement does trigger though. Do you know why?
Is this issue resolved?
Ideally it should show the alert. Please confirm if Checkbox__c is CHECKBOX field, not picklist field.