Hi Frappe Community, I am using many heavy server and client scripts to customize html custom fields in some of my doctypes.
I am also using buttons inside these html fields to call server scripts.
My problem right now is, that I need to update/refresh the form after clicking such a button in a html field, which is not working for me ![]()
Does any of you have I idea, please? ![]()
I have tried following refresh types without any success:
-
Form Reload using
cur_frm.reload_doc()cur_frm.reload_doc(); -
Page Reload using
location.reload()setTimeout(() => { location.reload(); }, 500); // Delayed refresh -
Custom Event Dispatch
document.dispatchEvent(new Event('custom_refresh')); // Emit custom event -
Form Trigger using
frappe.ui.form.triggerfrappe.ui.form.trigger(cur_frm.doc.doctype, 'refresh'); -
Full Page Reload with Delayed Refresh
setTimeout(() => { location.reload(); }, 500); // Delayed refresh -
Console Logging for Server Response
console.log("Server Response:", response);