{!REQUIRESCRIPT('/soap/ajax/39.0/connection.js')}
var rec =
'{!JSENCODE(TEXT(Apttus__APTS_Agreement__c.Reason_for_cancelation__c))}';
if(rec != "--None--" ) {
HYPERLINK("/apex/Apttus__AgreementCancel?id=" &Id,
IMAGE("/resource/Apttus__Button_CancelRequest", "Cancel Request"), "_self");
}
else {
alert('You cannot do this');
}
ERROR-<span class="validStyle">No syntax errors in merge fields or functions.
</span>