ERPNext Foundation ERPNext Cloud User Manual Blog Discuss Frappé* Donate

Firing a event/function when changing any field value in doc


Hi, I am stuck in a case, where every field is linked to other field, so changing one field value will impact other. so i would to write a script to fire a event when any field value is changed.


Try writing that script on event on_update


@root13F on_update event is not triggering.

In mycase I need to fire event when any field value is changed without save/updating the doc.




Create a custom script with following code:

frappe.ui.form.on ('[your doctype here]', 'setup', function(frm){
    for (const fieldname of => x.fieldname)) {
        frappe.ui.form.on(frm.doctype, fieldname, function() {
          // your code here