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

Salesforce custom button validation rule
If statement on custom button syntax
Hi,
I am trying to do some validaton checks on some fields via a custom button and am getting stuck on a number field. Basically I want to check.....does an opportunity type = Tender, the final price is less than 100,000 and the sharepoing link is blank Here is the code: -
if({!ISPICKVAL(Opportunity.Opportunity_Type__c, "Tender")} && '{!Opportunity.Final_Price_Number__c}' > "100,000.00" && '{!Opportunity.Final_Pricing_Sharepoint_Link__c}' == "") {
alert('You need to enter the Final Pricing Sharepoint URL for this Tender before submitting for approval');
The final price field is a number field and I think its this thats not working. I am getting the error message all the time when I only need it when the figure typed in is less than 100,000
Thanks
Hi,
I am trying to do some validaton checks on some fields via a custom button and am getting stuck on a number field. Basically I want to check.....does an opportunity type = Tender, the final price is less than 100,000 and the sharepoing link is blank Here is the code: -
if({!ISPICKVAL(Opportunity.Opportunity_Type__c, "Tender")} && '{!Opportunity.Final_Price_Number__c}' > "100,000.00" && '{!Opportunity.Final_Pricing_Sharepoint_Link__c}' == "") {
alert('You need to enter the Final Pricing Sharepoint URL for this Tender before submitting for approval');
The final price field is a number field and I think its this thats not working. I am getting the error message all the time when I only need it when the figure typed in is less than 100,000
Thanks
Let me know if that resolve your issue.
All Answers
Please replace your code with below. It will work.
Please let me know if you face any issue.
I get an error missing }
Let me know if that resolve your issue.