Feedback

onAfterUpdateAll

This event occurs when there is an update on a multiple row only on multiple rows forms.

This event occurs after clicking on the Save button of the multiple record form. The Form will execute the onValidate, onValidateSuccess and onBeforeUpdateAll events, and then it will execute the onAfterUpdateAll event after execute all the SQL commands to update the records into the database.

 


Example: We can update the total value of an invoice (tb_invoice) after update its items (tb_invoice_items) in a multiple records form.

sc_lookup (tot, "select sum(value_item) from tb_invoice_items where num_nf = {num_nf}");

{tmp_tot} = {tot [0] [0]};

sc_exec_sql ("UPDATE tb_invoice SET total_items = {tmp_tot} WHERE num_nf = {num_nf}");