I would like to create a Detail Page JS button with the below (under the Lead object if it matters)
If A=TRUE and the button is pressed, update checkbox B to TRUE. If A=FALSE and the button is pressed, show Alert "Not the Right Case"
Really straight forward yet am having issues implementing. Any help is much appreciated.
var newRecords = [];
var c = new sforce.SObject("Lead");
c.id ="{!Lead.Id}";
if ({!Lead.RedCarpetSignup__c}= true)
{
c.{!Lead.Email_Verified_and_Activated__c} = true;
}
newRecords.push(c);
result = sforce.connection.update(newRecords);
window.location.reload();
Thanks.