-
Notifications
You must be signed in to change notification settings - Fork 10
Generic refresh hook for all DocTypes
vr-greycube edited this page Jul 22, 2022
·
1 revision
$(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);
}
});