After creating a workflow for expense claim.
When tried the workflow on an expense claim doc, i couldn’t submit it. The error message said"Approval Status must be ‘Approved’ or ‘Rejected’
When i go back to my work flow state to change the draft to Rejected,another system error will say that "You cant Cancel before Submitting"
This is related to Doc Status. pls share a screenshot of your workflow.
Okay sir. I have a problem sending complete snapshot of my workflow because this page said i cant upload more than one picture as a new user.
Though my workflow is quite long,but i have tested it all the way to the last one,but when i want to summit it will give the error message.
Check if the Rejected state has docstatus = 2 in the states table.
Draft =0
Submitted=1
Cancelled=2
Looks like the rejected state is assigned docstatus =2. Logically, you can’t set a document to cancelled state unless it is submitted. So that transition has to come after document submission.
So what should i do sir?
I think there is a status field in doctype that should be set to approved or rejected
Here the approval status, are you setting it to approved or rejected before submitting?
I went to doc type to change and saw that approval status has:
Draft
Approved
Rejected
I change it to only two options,Approved or Rejected but i cant save it after. Its showing error message.
Find snapshot error message
Oh then I am not sure what could be the problem as by default I had this field in the doctype,and I have not really worked on this doctype
Maybe editing the options is creating issue as there will be some code for the “draft” option