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
TN AdminTN Admin 

error on custom javascript button

Below code has to update the Leadership_Notification_check__c when the Suite, RedLightReview are not empty,TOV >= 5000000000 and check field is 0.
{!REQUIRESCRIPT("/soap/ajax/29.0/connection.js")}

var Suite= document.getElementById('00Nq00000017vbe_ileinner').innerHTML;
var TOV= document.getElementById('00Nq000000181Wp_ileinner').innerHTML;
var RedLightReview= document.getElementById('00Nq00000017qTB_ileinner').innerHTML;
var ce = new sforce.SObject("Contract_Extract__C");
ce.id = "{!Contract_Extract__c.Id}";
var check = {!Contract_Extract__c.Leadership_Notification_check__c}
if ((TOV >= 5000000000 ||  (Suite != ' ' || Suite != ' ' ) || (RedLightReview!= ' ' || RedLightReview != ' ') ) && check === 0) {
       ce.Leadership_Notification_check__c = 1;
       result = sforce.connection.update([ce]);
       
}

Thanks in advance...