hi all,
can anybody already execute workflow via custom buttion in script report (js)
regards
hi all,
can anybody already execute workflow via custom buttion in script report (js)
regards
What is your use case? you can set workflow state if you on the same form via code
e.g. cur_frm.set_value("workflow_state", "value to set")
Also, you can set it from python side,
frappe.db.set_value(doctype, docname, "workflow_state", "value_to_set")
But it only set your workflow_state
field. Not update doc status and events
@Sangram I created a script report and added button for approval state what i want to do is let the user approve from report.
Any help guys
Write frappe.call
on buttons click which calls the python method.
In a python, method update the workflow_state
frappe.db.set_value(doctype, docname, "workflow_state", "value_to_set")