Thursday, 5 February 2015

Stop workflow submitter from approving [AX 2012 R3 CU8]

This is a common request in previous versions of AX. Usually you would want to stop the submitter from approving their own workflow.

Dynamics AX 2012 CU8 has introduced a new flat on the Workflow parameters. “Disallow approval by submitter”. This is a global setting and not workflow specific.

2015-01-22_0947

To test this out I created a user group with 2 users. One of them being my account.

image

I created a workflow for journals and used Role based assignment to the APTeam user group.image 

I was allowed to submit it but I found the workflow history had an error. ie Submitter cannot be the approver.

image

I understand why Microsoft has done it this way but I am not a big fan of it. I don’t like introducing errors in the workflow history. It makes the workflow configuration very difficult. Lets say you had a team of 5 users. Each one was able to submit but not approve their own journals. Then you would have to create a complex workflow configuration to deal with all the combination.

I have done similar solutions in the past where the check was done at the time of approval. The user received an error on click of Approve.

4 comments:

Germán Caballero said...

Good post! Nice to see this new option

Ideally Workflow should not generate an
approve task for the submitter.

Thanks for sharing!

Hc Hansen said...

Thanks for sharing

Chris Tilley said...

Hi,

Just so you are aware this behaviour has been patched so that if the submitter is in the same group as the approval group, they are removed from the list of users given the work item to approve but no stop error is received:

https://fix.lcs.dynamics.com/Issue/Resolved/1162660?kb=3127006&bugId=3650670

Munib Ahmed said...

Thats great to hear. Thanks Chris for the update.