Tuesday, 10 August 2021

D 365 FO / Ax 2012 /2009 X++ code to find the Logged in Worker details

Hi all,

Below is the line of code that will help you to get the Logged in employee details is he mapped with User in the Userinfo Form.



                 HcmWorker hcmWorker;

                hcmWorker = hcmWorker::find(DirPersonUser::findUserWorkerReference(curUserId()));

                info(strFmt("Current Worker name is : %1 ",hcmWorker.name()));




Thank you

Keep Daxing :)

No comments: