I want to use these methods but I get the following error on JS console (at a Doctype which has an active workflow).
Uncaught TypeError: Cannot read property 'get_default_state' of undefined
(anonymous) @ VM261:1
frappe.get_doc work fine though. Where am I going wrong?
I would also like to know how can I access
What is your use case? What are you trying to achieve?
@Sangram I’m trying to access the workflow properties (like current state, next state) for a given doctype.
you can access it directly -
I’m saying I need to access the workflow methods, not doc method.
doc.workflow_state is a variable which stores the current state.
How do I get the next state, aka use
you can find
next_workflow_state on validate event. on every workflow action, the document gets Saved.
So, you can capture
Next State on
Check this thread
Thanks for your help, marking this as solution