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()));
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156