...
Code Block |
---|
function fieldsOnDelete(){ return "MEFIELDNAME"; } function onDelete(field1){ if( field1 == 'field value'){ window.location = "MELT://showAlert/Message to display"; return false; }else{ return true; } } |
An example of a complete onDelete query with header and footer information, which checks a single condition, is as follows:
Code Block |
---|
<html><head><title>OnDeleteExample1</title> <script type="text/javascript"> function fieldsOnDelete(){ return "CUSTKW02"; } function onDelete(status){ if( status == 'Open'){ window.location = "MELT://showAlert/You cannot delete open Activities"; return false; }else{ return true; } } </script></head><body></Body><body></html> |
where:
function fieldsOnDelete(){ return "MEFIELDNAME";} defines which field to read. To read the value stored in the CUSTKW02 field, the following is defined in onDelete example 1:
...
Code Block |
---|
else{ return true; } |