You need to sign in to do that
Don't have an account?
AgilidiRP
Javascript custom button questions
Hello-
I posted this question in the customer community, but that may not be the right forum.
I am trying to code a javascript custom button on the opportunity in order to prevent the ability to "Send to EchoSign" unless some conditions are met. My code is this:
{!REQUIRESCRIPT("/soap/ajax/9.0/connection.js")}
if('{!User.Quote_Certified__c}'==true || '{!Opportunity.Amount}' < 100000 || '{!Opportunity.Approval_Status__c}' == 'Approved')
{
{
window.open("/apex/echosign_dev1__AgreementTemplateProcess?masterId={!Opportunity.Id}");
}
else
{
{
alert("Opportunity must be approved")
}
First, is the use of javascript in a custom button the best way to restrict access to "Send to EchoSign"?
Second, my condition '{!Opportunity.Amount}' < 100000 is not working. Is my syntax wrong?
Thanks,
Rich
First, is the use of javascript in a custom button the best way to restrict access to "Send to EchoSign"?
Second, my condition '{!Opportunity.Amount}' < 100000 is not working. Is my syntax wrong?
Thanks,
Rich
Werewolf figured it out. I was trying to compare a string to a number. Thanks!
All Answers
Hi,
I dont think that there is any problem with syntax. I tried the same and its work perfactly for me .
Werewolf figured it out. I was trying to compare a string to a number. Thanks!