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

This event occurs after clicking the Insert button of the multiple record form. The form will execute the onValidate and onValidateSuccess events, then it will execute the onBeforeInsertAll event before starting the execution of the SQL commands to insert the records into the database.


Note: This event is triggered only once, regardless of the number of lines inserted in one click on the Insert button.

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 ");