Skip to main content

Notifications

Finance | Project Operations, Human Resources, ...
Suggested answer

How to get department from dataverse to power automate?

Posted on by 281

Hi, 

I have created a termination flow which send me an email when an employee is terminated. I want to be able to get the employees department? When I list the job position table it doesn't provide me the name of department? 

Thanks,

Henry 

  • Henry G Smith Profile Picture
    Henry G Smith 281 on at
    RE: How to get department from dataverse to power automate?

    Hi parag , 

    Sorry If I missed something. Would I be putting Position worker assignment > Job positions > Department in a get row from Id? Like I have done in my previous post? I tried this by adding the cdm_workerid from the get row ID (worker table), it fails at the get row and says " cdm_positionworkerassignmentmap With Id = d5dbe866-2054-ec11-8f8e-00224815a1b6 Does Not Exist" 

    Should I be doing this another way?

    Regards,

    Henry 

  • Suggested answer
    Parag Chapre Profile Picture
    Parag Chapre 12,271 Most Valuable Professional on at
    RE: How to get department from dataverse to power automate?

    Hi Henry,

    You can use Employment > Worker > Position worker assignment > Job positions > Department.

    This is the hierarchy you need to use to get employees department.

  • Henry G Smith Profile Picture
    Henry G Smith 281 on at
    RE: How to get department from dataverse to power automate?

    Hi Parag,

    Thanks for the example. This works for this scenario but  I am currently using the employments table as a first trigger followed y a get row y ID to get the works details to be inputted into a email.

    How would I loop through the  job positions and department table to connect to these two current tables I am using?

    I thought I could get the row by Id for position worker assignment and job position but that seems to have not worked.

    pastedimage1658099186644v1.png

    Kind Regards,

    Henry

  • Suggested answer
    Parag Chapre Profile Picture
    Parag Chapre 12,271 Most Valuable Professional on at
    RE: How to get department from dataverse to power automate?

    Hi Henry,

    Check this.

    pastedimage1657914626104v1.png

  • Henry G Smith Profile Picture
    Henry G Smith 281 on at
    RE: How to get department from dataverse to power automate?

    Hi Parag,

    Thanks for this - I played around with it on a separate flow which worked. But I am confused with how I would get the department using the department and job position tables for the current flow below which triggers when a employee is terminated:

    pastedimage1657854281567v1.png

    How would I connect the department table with the two tables I am currently using in this flow? (Workers and employments)

    Regards,

    Henry

  • Suggested answer
    Parag Chapre Profile Picture
    Parag Chapre 12,271 Most Valuable Professional on at
    RE: How to get department from dataverse to power automate?

    Hi Henry,

    You can get department number from job position and based on this number, search the record in department entity where you can get name.

  • Suggested answer
    Charlotte X Profile Picture
    Charlotte X on at
    RE: How to get department from dataverse to power automate?

    Hi Henry,

    I found a related post and a blog you might want to refer to.

    Solved: How to get the department for the worker ? - Power Platform Community (microsoft.com)

    Get employee’s manager from the dataverse - Dynamics 365 Human Resources Community

    Best Regards,

    Charlotte

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!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans