Below is a Code to get current user Employee code in axapta. If employee relation exist for user then this code will work otherwise you need to attach employee for users form then add work using relation button.
HcmWorker::find(DirPersonuser::findUserWorkerReference( curUserId())).PersonnelNumber;
HcmWorker::find(DirPersonuser::findUserWorkerReference( curUserId())).PersonnelNumber;
Comments