function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Salesforce Test 5Salesforce Test 5 

JavaScript Error

Hi

I have created a custom button for vf page using javascript.but its showing error like ....
A problem with the OnClick JavaScript for this button or link was encountered:

missing ; before statement
Salesforce Test 5Salesforce Test 5
f({!Quote__c.Approved_Artwork_Attached__c} == 0)
{
alert('Approved Artwork has not been uploaded');
}
else
{
window.location.href ="/apex/Testing?CF00N9000000810yt={!Quote__c.Opportunity__c}&CF00N9000000810yu={!Quote__c.Id}&CF00N9000000810yx={!Quote__c.Company_Name__c}&recordTypeName={!Quote__c.Record_type_name__c}";
}

if({!Quote__c.Approved_Artwork_Attached__c} == 0)
{
alert('Approved Artwork has not been uploaded');
}
else
{
window.location.href ="/apex/Testing?quoteId={!Quote__c.Id}& setDefaultValues=true";
}
This is the javascript code
Abhilash Mishra 13Abhilash Mishra 13
you must be missing ; somewhere in javascript code please check. Let me know, if this is not the issue