I have a custom button which checks for the following condition but I'm getting an error like "Invalid left-hand side assignment :
Display Type: Detail Page Button
Behavior: Execute Javascript
Content Source: Onclick Javascript
Code:
if(
({!Lead.Content_Approval__c} == True &&
{!Lead.Relations_Approval__c} == False &&
{!Lead.Final_Approval__c} == False &&
{!Lead.Approval_Confirmation__c} == True &&
{!Lead.Relations_Approval_Confirmation__c} == False &&
{!Lead.Approved__c} == False)
){
if (confirm('Are you sure you want to log this activity?')) {
// Fire away!
window.location.href = "/apex/sampleleadbatch?scontrolCaching=1&id={!Lead.Id}";
} else {
// Go back to the Lead page
}
}
else {
alert("Please get approved the Lead before hitting 'Send'.");
}