Im trying to run something when I click on add row button on a child_table.
Doctype: Maintenance Visit
Child_table: purposes
child_table_field: idx
Script:
frappe.ui.form.on("purposes", {
idx_add: function(frm){console.log("works!")}
});
Im trying to run something when I click on add row button on a child_table.
Doctype: Maintenance Visit
Child_table: purposes
child_table_field: idx
Script:
frappe.ui.form.on("purposes", {
idx_add: function(frm){console.log("works!")}
});
Did u try before_purposes_add
event?
That’s worked:
frappe.ui.form.on('Maintenance Visit Purpose', 'purposes_add', function(frm){
console.log('worked');
});