Hi ERPNext Community,
I’m new to ERPNext and loving it, but I’m stuck on an issue.
I have a workflow where the status changes to “Zugewiesen” (Fieldname: workflow_status") on the action “Anfrage einem Mitglied zuweisen”. I want to trigger a server script when this happens.
Here’s my script with event before submit
:
if doc.workflow_status == "Zugewiesen":
frappe.msgprint("Workflow_status changed to Zugewiesen")
This doesnt work.
With doc.docstatus
in another script (also with before submit
) it works:
if doc.docstatus == 1:
frappe.msgprint("Workflow_status changed to Zugewiesen")
Any ideas why doc.workflow_status
isn’t working? I can’t use docstatus
because in my workflow, several statuses (including “Zugewiesen” ) all have docstatus == 0
. Its a multi step process…
This is probably a super noob question, but I’d really appreciate any help!
Thanks in advance :)!
Best, Jan from