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

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'); 

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