You need to sign in to do that
Don't have an account?
Giancarlo Amati
unexpected ==
Hi Team,
I have a button on my layout that executes a Javascript, but when clicking on it I receive "Unexpected ===" where SBQQ__Quote__c.SBQQ__BillingFrequency__c is a picklist but I cannot understand why.
Any help?
Thank you
GC
I have a button on my layout that executes a Javascript, but when clicking on it I receive "Unexpected ===" where SBQQ__Quote__c.SBQQ__BillingFrequency__c is a picklist but I cannot understand why.
Any help?
Thank you
GC
this.disabled = true; this.className = 'btnDisabled'; if ( {!SBQQ__Quote__c.SBQQ__BillingFrequency__c} === null) { window.alert(' The \'Billing Frequency\' field is blank and needs to be populated before submitting this quote for approval. Please update the \'Pay Upfront\' field on the associated opportunity to enter a value into \'Billing Frequency\' ' ); } else window.location='./apex/SubmitQuote?Id={!SBQQ__Quote__c.Id}';
if ( {!ISPICKVAL(SBQQ__Quote__c.SBQQ__BillingFrequency__c,'')} ) {
window.alert(" The Billing Frequency field is blank and needs to be populated before submitting this quote for approval. Please update the Pay Upfront field on the associated opportunity to enter a value into Billing Frequency ");
}
else window.location='./apex/SubmitQuote?Id={!SBQQ__Quote__c.Id}';
All Answers
Update if condition with below snippet.
You have given '===' which should be '=='
Hope above information was helpful.
Please mark as Best Answer so that it can help others in the future.
Thanks,
Vinay Kumar
below my full code:
if ( {!ISPICKVAL(SBQQ__Quote__c.SBQQ__BillingFrequency__c,'')} ) {
window.alert(" The Billing Frequency field is blank and needs to be populated before submitting this quote for approval. Please update the Pay Upfront field on the associated opportunity to enter a value into Billing Frequency ");
}
else window.location='./apex/SubmitQuote?Id={!SBQQ__Quote__c.Id}';