In the given script I want to make sure before my custom code ERP’s payment_terms_template should be triggered and finished first. How can this be done since we do not have super function in client scripts.
frappe.ui.form.on("Purchase Invoice", {
payment_terms_template(frm) {
// Custom Code
},
});
hello @Sandeep_Kakde
please check it :
In my case:
i made a logic to fill the child table with certain data after the document is loades,
but the problem was the child table not exist yet so i needed to reload the document by myself.
what was my solution?
frappe.ui.form.on('Your Doctype', {
onload_post_render: function(frm) {
frappe.after_ajax(() => {
// your logic here
});
}
}
Use frappe.after_ajax inside onload_post_render when you need to:
Wait for all data (especially child tables) to be r…
I hope this helps in your case