Hi,
I’ve a form with field status linked with Workflow,
I used this script to check if someone change status to Verified then it popups the message to confirm,
frappe.ui.form.on("Time Tracking", {
status: function(frm){
popup(frm);
}
});
var popup = function(frm)
{
if(frm.doc.status == "Verified")
{
frappe.confirm(
'Are you sure you want to verify this form? After you click on <b>Verify</b>, you will not be able to change the data.',
function(frm){
cur_frm.save();
},
function(frm){
window.close();
}
);
}
}
Its working fine when i change status from status field, but its not working when i change status from Action Button.