Generic refresh hook for all DocTypes - jigneshpshah/greycube_helpmanual GitHub Wiki

$(document).on('form-refresh', function (e, frm) {
// called on every form refresh of all doctypes
//can be used for a generic function to be run for all doctypes in refresh..
// instead of frappe.ui.form.on('<doctype>', function(frm){...});


  if (frappe.boot.wati_whatsapp_doctypes.includes(frm.doc.doctype)) {
    setTimeout(() => {
      setup_wati_whatsapp(frm);
    }, 600);
  }
});
⚠️ **GitHub.com Fallback** ⚠️