Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Answered

Leave Request Workflow failing after Manager approves

(0) ShareShare
ReportReport
Posted on by 90

Hi all, 

I have a workflow for approving Leave Request but getting the error; 

Stopped (error): X++ Exception: The hierarchy provider did not return any users.
at SysWorkflowHierarchyProvider-resolve
SysWorkflowHierarchyProvider-resolveHierarchy
SysWorkflowQueue-resume

This happens after the manager as approved the workflow as shown in screenshot; 

pastedimage1618831709360v1.png

I assume its something to do with the way the workflow could be setup? However there isn't a way to say 'Stop when its been approved' 

pastedimage1618831867140v2.png

Anyone have any ideas?

Cheers,

Matt.

  • Clare45 Profile Picture
    Clare45 112 on at
    RE: Leave Request Workflow failing after Manager approves

    Hi Matt, Thanks for this. Would you be able to help me with the following question: Basically we have a managerial hierarchy, and the CEO limit is 20M, and we have a PR that is worth 19M. Everything works fine up until after the CEO approves.  I get an error after the CEO approves saying that he has no report to. How do I build it into the workflow to stop after the CEO approves? Any help would be appreciated. Thanks again!

  • RE: Leave Request Workflow failing after Manager approves

    Hello Matthew,

    Yes, your assumption is correct.

    The approval will go only to the direct manager.

    Glad I could help!

  • Matthew Falle Profile Picture
    Matthew Falle 90 on at
    RE: Leave Request Workflow failing after Manager approves

    Hi Alexandra,

    That has worked perfectly! Thank you for your help.

    Would you be able to answer a final question? Will the workflow work in this way;

    3 users: Bob -> Jim -> Tom

    If Bob requests a holiday, only Jim has to approve it.

    If Jim requests a holiday, only tom has to approve it.

    For the CEO I am going to make a seperate leave type called "Director Holiday" so it should be ok.

  • Verified answer
    RE: Leave Request Workflow failing after Manager approves

    Leave-request-_2800_manager-approval_29002D00_1.0.0.0.xml

    Can you try this workflow configuration then? 

    Hope I understood the requirement correctly.

    And for the CEO I would create a conditional decision, before the approval step that is included in the configuration provided. So if it's CEO --> auto-approve or send it to HR, or whatever your business it. If not, go into the approval step for the line manager.  

  • Matthew Falle Profile Picture
    Matthew Falle 90 on at
    RE: Leave Request Workflow failing after Manager approves

    Also just to add, really all I am trying to do is make it so an employee can request a holiday -> Manager can approve or deny based on the position hierarchy.

    If i am going about this the wrong way please let me know

  • Matthew Falle Profile Picture
    Matthew Falle 90 on at
    RE: Leave Request Workflow failing after Manager approves

    Sure,

    pastedimage1619170997954v1.png

    pastedimage1619171010372v2.png

    pastedimage1619171022887v3.png

    pastedimage1619171033452v4.png

    Escalation and time limit are un ticked. 

    Kind regards,

    Matt

  • RE: Leave Request Workflow failing after Manager approves

    Hi Matthew,  

    Can you share more information about this conditional decision you have in there?

    Some screenshots could help.

  • Matthew Falle Profile Picture
    Matthew Falle 90 on at
    RE: Leave Request Workflow failing after Manager approves

    Hi Alexandra,

    It seems to be all of them. I do only have it hooked up to these two individuals currently as I am just in test. I have an auto-approval one which seems to be work correctly and I can view the approved time off. I will attach some images of the workflow incase someone spots anything...

    pastedimage1619170170789v1.png

    pastedimage1619170205798v2.png

  • RE: Leave Request Workflow failing after Manager approves

    Hello Matthew,

    Does this happen for all the leave request that go through this workflow or just this one?

    Thank you!

  • Matthew Falle Profile Picture
    Matthew Falle 90 on at
    RE: Leave Request Workflow failing after Manager approves

    Hi Micheal,

    Thanks! That has done the trick! For some reason the notification of it being "Approved" is failing due to a translation error but I have disabled that for now.

    I have bumped into another problem now that the Manager has approved the task and the workflow status is completed.

    pastedimage1619107697842v1.png

    How ever for some reason its still locked as submitted and hasen't filtered through to here;

    pastedimage1619107749596v2.png

    pastedimage1619107761295v3.png

    Any ideas on what could be stopping it? 

    Kind regards,

    Matt

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,431 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,503 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans