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

Problem with Java Button

Hi All,


Sure this is a syntax problem, but cant get my head around it:



var connection =sforce.connection; 
var CA = "{!CMC__c.DEBUG_ofCompletedAssessments__c}";
var User = "{!$User.Full_Name__c}",
var CR = "{!CMC__c.Case_Reason__c}",
var URL = "{!CMC__c.UAT_QAT_Zoomerang_URL__c}",

                                CA <1, 
                                                CR = "New Script QAT", 
                                                CR = "New Script UAT"
alert("Either an Assessment is not applicable for this case, or you are not authorised to complete assessments");



 I get 'Unexpected Identifier' when clicking?


Any help appreciated.

Best Answer chosen by Admin (Salesforce Developers) 
dotnet developedotnet develope

Hi ,




var User = "{!$User.Full_Name__c}",         replace ',' -->;
var CR = "{!CMC__c.Case_Reason__c}",  replace ',' -->;

var URL = "{!CMC__c.UAT_QAT_Zoomerang_URL__c}",  replace ',' -->;