Code which is working
{!REQUIRESCRIPT("/soap/ajax/29.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/29.0/apex.js")}
window.open('/apex/transferrequest?id={!Case.Id}');
Code which is not working
{!REQUIRESCRIPT("/soap/ajax/29.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/29.0/apex.js")}
if({!Case.Status} = 'Closed'){
alert('Case is Closed cannot update.');
}
else{
window.open('/apex/TransferRequest?id={!Case.Id}')
}
If statement is being validated alert is shown, but there is some issue with else. What could be the possible solution.