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
PrasadVRPrasadVR 

Issue with custom button

Hello ,

I have created one custom with onclick Execute Java Script , it is working fine 

{!REQUIRESCRIPT("/soap/ajax/24.0/connection.js")}

var Opp = "{!Opportunity.Name}";
alert(Opp);

But if the Opportunity Name starts with Double quotation then It's not working

If Opportunity Name = "Opp Name with Quotation"   ----getting error
If Opportunity Name = Opp Name with out Quotation ----working

Can some one help on this !!!
Vamsi KrishnaVamsi Krishna
replace double quote " with single quote ' next to the curly braces while reading the name.. it will fix your error..

{!REQUIRESCRIPT("/soap/ajax/24.0/connection.js")}

var Opp = '{!Opportunity.Name}';
alert(Opp);