when i click in Request for Approval then dialogue comes but workflow State is already change to next state before running Yes and No dialogue option?
when user click yes then workflow state should change to the next state ? any idea ?
frappe.ui.form.on('Leave Application', {
before_workflow_action: async (frm) => {
if (frm.selected_workflow_action === "Request for Approval"){
frappe.confirm('Are you sure you want to proceed?',
() => {
console.log('yes')
}, () => {
console.log('no')
})
}
}
});