on_after_open¶
- on_after_open(item)¶
domain: client
language: javascript
class Item class
Description¶
Occurs after an application receives a response from the server for obtaining a dataset.
The item parameter is an item that triggered the event.
Write an on_after_open event handler to take specific action immediately
after an application obtains an dataset from the server. on_after_open is
called by open method.
On Demo application this event is used to identify the Invoice for the Track purchased:
function show_invoice(invoice_table) {
var invoices = task.invoices.copy();
invoices.set_where({id: invoice_table.invoice.value});
invoices.open(function(i) {
i.edit_options.modeless = false;
i.can_modify = false;
i.invoice_table.on_after_open = function(t) {
t.locate('id', invoice_table.invoice.value);
};
i.edit_record();
});
}