onBeforeUpdate
This event occurs after form validation (onValidate and onValidateSuccess), when clicking the Save button, and before executing the SQL command to Update the record in the database.
Example: We are checking the user privileges table before updating the record, if it does not have such privilege, we send an error message.
sc_lookup(priv_upd ," select priv_upd from tb_privileges where login = [var_login] ");
if( {priv_upd [0][0]} != 'YES'){
sc_error_message("You do not have privileges to perform this operation");
}