How can I use "Workflow" to force aproval for "Material Issue" docs only?

I have been using workflows for quite some time in v10 and v11. However, I now need to use them slightly differently.

I want to force “Approval” for “Material Issue” and “Material Receipt” docs within the “Stock Entry” doc type. All other material transfers are easily tracked within the system but the Material Issue and the Material Receipt docs are open ended and a bit more susceptible to nefarious use. We want only those 2 docs to require approvals of a manager.

How can we accomplish this?

Is this something that might only be available in v13? If so how to use it?

I know there are other fields in the Workflow that we have never used (because we could not find any document explaining them) like “Update Field” and “Update Value”

I have no idea how those fields are use or if they would help me with this new task. So, if anyone has a link to an explanation for those 2 fields that would also be helpful.

Thanks in advance for any help here.

BKM

1 Like

I think I understand what you’re trying to do, and if I’m not mistaken what you are describing is exactly what the condition field in Workflow Actions was designed to make possible.

Simple example:

  • Have two user types: stock user and stock manager.
  • Create a Workflow with two states: Proposed and Confirmed (or whatever)
  • Create a workflow transition Proposed->Confirmed for user type “Stock Manager”.
  • Create another workflow transition Proposed->Confirmed for user type “Stock User”, but for this one add the condition doc.stock_entry_type not in ["Material Issue", "Material Receipt"].

The Confirm action will be available Stock Managers all the time, and it will be available to Stock Users for Stock Entries other than “Material Issue” and “Material Receipt”. I don’t recall when this functionality was added exactly, but I believe it was there for v11 too.


The Update Field and Update Value properties are described in the documentation, though very briefly. They’re pretty straight forward though. When entering a given state, the workflow engine will set the Update Field to whatever you’ve got put in Update Value.

Your document might, for example, have a checkbox field called “Ready for delivery”, and you might set that to 1 when the state becomes “Submitted”.

1 Like

All I can say is Wow!

Thank you for such a complete answer @peterg !!

I am traveling for another client today and tomorrow, but will try your suggestion on Friday when I return. i was not aware of the “condition” field. I will seek out information n it’s use. It does sond like it was designed for just my use-case.

Thanks again - BKM :sunglasses: