Feedback

onBeforeInsert

This event occurs before add a new record on the form application.

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

 


Example: We check the user privileges table before inserting the record, if he does not have privilege, we should send an error message.

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

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

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

}