You need to sign in to do that
Don't have an account?
Rakesh Kumar 335
Need Valudation rule to fire on a Visual force page
After convert button is pressed on lead, a visual force page fires.
I want a validation on this conversion vf page & it should only fire when the value is 'unknown' on the below field.
Field: "Cx interested?" - values 'yes' or 'no' or 'unknown' on lead
Pls help
I want a validation on this conversion vf page & it should only fire when the value is 'unknown' on the below field.
Field: "Cx interested?" - values 'yes' or 'no' or 'unknown' on lead
Pls help
Hello, Create a custom button on object
create formula according your condition
You need to create javascript custom button and check condition accordingly,
var field = field_Api;
e.g. if(field == 'yes' || field == ''No || field == 'unknown'){
window.location='/apex/vfpage';
}
else{
// close show some alert or do nothing
}
Let me know if this helps you to solve your problem.
Thanks,
Sukanya Banekar
Salesforce Developer
if you change your button type to Execute JavaScript, and run the little script before the redirect, that could work. Basic script flow would be:
{!REQUIRESCRIPT("/soap/ajax/20.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/20.0/apex.js")}
if(Cx interested = "unknown"){
window.open('/apex/<whatever your page is>');
}
else{
alert("Nice try, think again.");
}
thanx,
Atul Patil
Salesforce Developer
www.zen4orce.com
There are two buttons on lead. 1.Convert, 2. Do not send
Clicking on convert opens a visual force page, while do not send is a java script button.
The requirement is, when either of these buttons are pressed a validation need to fire if the picklist value is selected as "unknown" for the field "cx interested?" on lead. This field has 3 picklist values: Yes/No/unknown. The validation should fire only when the value is selected as "Unknow"
Now pls tell me what changes i need to make in visual force page and java script button.
Thanks