ERPNext Conference 2019* ERPNext.com Blog

On_update_after_submit event is not working


#1

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!


#2

@Tanuj

Check all doc events here
https://frappe.github.io/frappe/user/guides/basics/hooks.html


#3

Hi @kolate_sambhaji,

Thanks for your reply, but none of them seemed to work on clicking “Update” after submitting the document.


#4

@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");
       }
});

#5

on_update_after_submit is not working.

Anyone find its working?

I need event call after update on submitted document.


#6

on_update_after_submit works with hooks