onAfterInsertAll
This event occurs after clicking on the Insert button of the multiple record form. The Form will execute the onValidate, onValidateSuccess and onBeforeInsertAll events, and then it will execute the onAfterInsertAll event after execute all the SQL commands to insert the records into the database.
For example, after entering the items of an invoice, (tb_itens_nf), in a multiple-record form, include in the "parent" table (invoice_file) the total value of the products.
sc_lookup (tot, "select sum (item_value) from tb_itens_nf where num_nf = {num_nf}");
{tmp_tot} = {tot [0] [0]};
sc_exec_sql ("update tb_itens_nf set total_itens = {tmp_tot} where num_nf = {num_nf}");