Hi,
In Custom Script, what event can I use to run the code when “Update” button is clicked after the document has been Submitted?
Example: frappe.ui.form.on(“Sales Order”,{{event}},function(from){
{{Action}};
});
Thanks a lot!
Hi,
In Custom Script, what event can I use to run the code when “Update” button is clicked after the document has been Submitted?
Example: frappe.ui.form.on(“Sales Order”,{{event}},function(from){
{{Action}};
});
Thanks a lot!
Hi @kolate_sambhaji,
Thanks for your reply, but none of them seemed to work on clicking “Update” after submitting the document.
@Tanuj if you have custom app, then you can check ‘on_update’ event from your app hooks.py file.
Also, for custom script, you can use following code
frappe.ui.form.on("Sales Invoice", "refresh", function(frm) {
if(frm.doc.docstatus==1){
msgprint("on update");
}
});
on_update_after_submit is not working.
Anyone find its working?
I need event call after update on submitted document.
on_update_after_submit works with hooks
Thanks, indeed, this works as a hook method
"Purchase Invoice": {
"on_update_after_submit": "smart_invoice_app.app.update_purchase_invoice_api",
},