Common Error: “No Users Were Retrieved”
When workflows are enabled in your Dynamics AX 2012 system, it was determined during setup on what basis the task/approvals would be assigned for each step. With Assignment selected in the workflow setup, the Assignment type was selected based on Participant, Hierarchy, Workflow user, a specific Active Directory User, or a work Queue.
In the following example, a workflow is stuck in the “In review” status.

A closer look in the Workflow history reveals that the workflow has been stopped. To get to the history, go to Human Resources > Common > All worker actions, then click the Actions button, and then View history.

This error message is telling us that for the step for which the workflow is stopped, we may need to change the workflow Assignment to the Assignment type and user type that will allow us to complete the workflow. Right now, the workflow hangs, because there is nobody filling the assignment. While in the workflow history, click Tracking details in the lower pane – this will show you which workflow segment to modify.

Now have the user with the appropriate role go and make the update to the workflow:

The problem was that we had the workflow step assigned to a role for which no users were assigned, the “Security administrator” role in this scenario. Similarly, we would have gotten this error if we had the workflow step set to Hierarchy and assigned to a vacant Position in the Managerial hierarchy.
How Can We Prevent the Workflow from Hanging Due to this Error?
There are a few best practices we can use to prevent workflows from hanging at a missing workflow user.
- When using the Managerial hierarchy, make it a company SOP for open/retired positions to be removed from the corporate position hierarchy in AX, even if temporarily. This means that the Position table and reporting hierarchy must always reflect active employee headcount.
- As a workflow best practice, build in Escalation steps to make sure that someone will take action on the task/approval even if there is a missing link in the chain. This forces the workflow, stuck “In review”, to send the workflow step to another user if the assigned user(s) have not taken action after a certain amount of time. If the escalation user(s) do not take action, an automatic action is taken on the step.

By Cody Bess, Functional Consultant for Arbela Technologies
The post Common Error: “No Users Were Retrieved” appeared first on Arbela Tech.
*This post is locked for comments