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.
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)
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()));
Martin Dráb
510
Most Valuable Professional
Saalim Ansari
315
Adis
312
Super User 2025 Season 1