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
Rung41Rung41 

onClick JavaScript button stopped working

All of a sudden my onClick JavaScript button is throwing an error. "Invalid or unexpected token"
The odd thing is the same button in my development org is working fine.
 
var type = '{!Opportunity.Type__c}'; 
if(type != "Guest Suite") { 
alert('At this time a Virtual Tour can only be requested for Guest Suites'); 
} 
else{ 
window.open('/a0J/e?\ 
&CF00N1B00000B8jle={!Opportunity.Name}\ 
&CF00N1B00000B8jle_lkid={!Opportunity.Id}\ 
&00N1B00000B8jll={!Opportunity.Account}\ 
&00N1B00000B8jlp={!Account.BillingStreet}\ 
&00N1B00000B8jlf={!Account.BillingCity}\ 
&00N1B00000B8jlo={!Account.BillingStateCode}\ 
&00N1B00000B8jls={!Account.BillingPostalCode}\ 
&00N1B00000B8jlg={!Opportunity.Delivery_Date__c}\ 
&00N1B00000B8jpM={!Opportunity.Lease_Agreement_Number__c}\ 
&retURL={!Virtual_Tour__c.Id}'); 
}

Any thoughts as to why?
Raj VakatiRaj Vakati
Its may be an issue with the below reason 
  • one of the field is returning null 
  • You dnt have an access to the fields ..pls chekc