Feedback

onBeforeDelete

This event occurs before deleting a record on a form application.

This event occurs after form validation (onValidate and onValidateSuccess), when clicking the Delete button, and before executing the SQL command to delete the record in the database.

 


As examples we can see in the example below, we consult a user privileges table before deleting the record, if it does not have such privilege, we send an error message.

sc_lookup(priv_del," select priv_del from tb_privileges where login = [var_login] ");

if({priv_del[0][0]} != 'YES'){

  sc_error_messagem(" you do not have privileges to perform this operation ");

}