You need to sign in to do that
Don't have an account?
Tarun Mukhia
Need help with custom button
Hi,
We have a button. I want to add validation to it if "AR" Or "Billing Address" fields is blank then stop user.
How can I add this as a seperate alert message "AR field is mandatory" & "Billing Address is Mandatory"?
Thanks
Tarun
{!requireScript("/soap/ajax/26.0/connection.js")}
var proceed = true;
if("{!Account.Account_Number__c}"!="") {
alert("This Account has already been on-boarded");
proceed=false;
} else if("{!Account.Validation_Requested_On__c}"!="") {
proceed = confirm("It appears that a user has already requested on-boarding for this Account (Requested By: {!Account.Validation_Requested_By__c}, on {!Account.Validation_Requested_On__c}).\n\nWould you still like to request that this Account be on-boarded?");
}
We have a button. I want to add validation to it if "AR" Or "Billing Address" fields is blank then stop user.
How can I add this as a seperate alert message "AR field is mandatory" & "Billing Address is Mandatory"?
Thanks
Tarun
{!requireScript("/soap/ajax/26.0/connection.js")}
var proceed = true;
if("{!Account.Account_Number__c}"!="") {
alert("This Account has already been on-boarded");
proceed=false;
} else if("{!Account.Validation_Requested_On__c}"!="") {
proceed = confirm("It appears that a user has already requested on-boarding for this Account (Requested By: {!Account.Validation_Requested_By__c}, on {!Account.Validation_Requested_On__c}).\n\nWould you still like to request that this Account be on-boarded?");
}
All Answers
{!requireScript("/soap/ajax/26.0/connection.js")}
var proceed = true;
if("{!Account.Account_Number__c}"!="") {
alert("This Account has already been on-boarded");
proceed=false;
}else If("{!Account.AR_Type__c}"==""){
alert("Please select AR Type");
proceed=false;
}
else If("{!Account.BillingAddress}"==""){
alert("Please enter Billing Address");
proceed=false;
}
else ("{!Account.Validation_Requested_On__c}"!="") {
proceed = confirm("It appears that a user has already requested on-boarding for this Account (Requested By: {!Account.Validation_Requested_By__c}, on {!Account.Validation_Requested_On__c}).\n\nWould you still like to request that this Account be on-boarded?");
}
Your first solution worked. I was selecting the Billing Address field, which is a combination of many fields. When I selcted Billing Street field, it worked.
Appeciate your help !
Thanks
Tarun