Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

Reporting Manager's details for an employee

(0) ShareShare
ReportReport
Posted on by 604

Hi Experts,

I need to fetch the email address of an employee's manager in my code. I am having employee's personnel number and I can use HCMWorker.email() for employee's email, sameway would be the simplest code to fetch the reporting manager's email Id ?

Thanks in advance. 

  • D365  beginner Profile Picture
    604 on at
    RE: Reporting Manager's details for an employee

    Hi Will,

    Thanks for your comment, I need to get the employee's reporting manager's email Id. Consider Employee A is reporting to Employee B, I need to get the Email of Employee B. (Position is set by standard position hierarchy  in AX)

  • Verified answer
    WillWU Profile Picture
    22,357 on at
    RE: Reporting Manager's details for an employee

    Hi AX Beginner,

    Yes, you could use this code to get the email of workers:

    HcmWorker Worker;
    
    Worker = HcmWorker::findByPersonnelNumber(“Number”);
    
    info(strFmt(“Email : %1”, Worker.email()));

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

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 510 Most Valuable Professional

#2
Saalim Ansari Profile Picture

Saalim Ansari 315

#3
Adis Profile Picture

Adis 312 Super User 2025 Season 1

Overall leaderboard

Product updates

Dynamics 365 release plans