{!REQUIRESCRIPT("/soap/ajax/29.0/connection.js")}
if({!Contract.Status} != 'Approved')
{
alert('You cannot sent a contract unless fully approved');
}
else
{
window.location.href="https://salesforce.com";
}
}
3 个回答
You just need these 4 lines and nothing else: if('{!Contract.Status}' != 'Approved')
alert('You cannot sent a contract unless fully approved');
else
window.location.href = "https://salesforce.com";
B/w out of curiosity - Are you sending this to an Approval Process ? Why not add that Condition to the Initial Filter Criteria ?