You need to sign in to do that
Don't have an account?
Shuang Hu
A problem with the OnClick JavaScript for button "New Quote"
Hi all
,
When I click button "New Quote" on one Opportunity after adding products, the page shows "A problem with the OnClick JavaScript for this button or link was encountered: unterminated string literal"
But only for one specific Account.
Should I revise the "OnClick JavaScript" for the button?
Thank you,
Shuang
,
When I click button "New Quote" on one Opportunity after adding products, the page shows "A problem with the OnClick JavaScript for this button or link was encountered: unterminated string literal"
But only for one specific Account.
Should I revise the "OnClick JavaScript" for the button?
Thank you,
Shuang
Please share the Javascript code for the button in order to know what is failing. ( Opportunity --> buttons or links --> New quote )
Regards
Medhya Mahajan
window.parent.location.href = "https://ap2.salesforce.com/0Q0/e?retURL=%2F{!Opportunity.Id}&oppid={!Opportunity.Id}&BillingName={!Opportunity.Billing_Account__c}&BillingAddressstreet={!Opportunity.Bill_To_Street__c}&BillingAddresscity{!Opportunity.Bill_To_City__c}&BillingAddressstate={!Opportunity.Bill_To_State_Province__c}&BillingAddresszip={!Opportunity.Bill_To_Zip_Postal_Code__c}&BillingAddresscountry={!Opportunity.Bill_To_Country__c}&CF00N28000005y9lP={!Opportunity.Account}";
}else{
window.parent.location.href = "https://ap2.salesforce.com/0Q0/e?retURL=%2F{!Opportunity.Id}&oppid={!Opportunity.Id}&CF00N28000005y9lP={!Opportunity.Account}";
}
It looks like some data issue.
The account for which the error is coming might be having single or double quote in the value due to which this URL formation ends as soon as the quote is encountered and the remaining part of the URL is not evaluated leading to the error.
It is suggested to look into the data of that particular account ( of these fields in the URL of javascript ) to see for ( ' OR " ).
Mark as solved if this helps.
Regards
Medhya Mahajan
Thank you for your suggestion!
But I don't find single or double quote in the value of this account for now.
Cannot debug at my end , to me it seems like data issue only. Check every field value thoroughly.
Regards
Medhya Mahajan