Setup Workflow from Draft to Cancelled

What if I wish to have a transition of draft to Rejected and rejected is a Cancelled document = 2?

How can I setup it up in the erpnext? I have read the below phrase from the ERPNEXT manual but I do not understand what to do to achieve it.

https://docs.erpnext.com/docs/v13/user/manual/en/setting-up/workflows

If you wish to give the option to cancel, you will have to write a workflow transition step that says from submitted you can cancel.

I dont think we allow this. You can add custom workflow state which suggests document was cancelled before it was even submitted.

docstatus == 2 implies it was submitted and then cancelled, there’s no direct way to jump to it.

It’s been discussed and requested since 2020.

Looks like it won’t be changed :slight_smile:

@ankush if you say custom workflow, does it mean through the custom script? :slight_smile: