Client-side script ...
 
Notifications
Clear all

Client-side script trigger for save on submitted document

Hi all, on an ERPNext v10 instance, I have tried to hook a custom script when update is clicked on a submitted document. The document contains some fields that are “allow on submit”, i.e. can be edited after the document is submitted. When this is saved to the database, I would like this change also to be sent to an external API. Now, I have tried several triggers like frappe.ui.form.on(“Sales Order”, { validate: function(frm) { console.log(“validate”); } before_save: function(frm) { console.log(“before save”); } before_update_after_submit: function(frm) { console.log(“before_update_after_submit”); } on_update: function(frm) { console.log(“on_updatee”); } }); Observing the console showed that none of the triggers actually fired. To make sure there is no generic issue, I have added a field change trigger on the field, and this one works nicely (also, before submit the validate and before_save do work)… So in short: how to know when a submitted document is being updated?

No topics were found here

Share: