I need execute some function in JS when fill taxes_and_charges
field on purchase invoice
doctype.
on taxes_and_charges
use the frappe.call method and call your function
frappe.ui.form.on("Purchase invoice", "taxes_and_charges", function(frm) { return frappe.call({ method: "path.to.your.function", args: { key: value }, callback: function(r) { // callback method } }); });
Nice!!!
Has some function before validate? like before_save
Ok then, thank’s for reply.