How to Get Worker Information in Ax 2012

In Microsoft Dynamics AX 2012, hcmWorker table just consist of 2 fields. But from this table we can get many information about worker. For example to get name, phone, email, department, position, and Address is illustrated on below job.

static void Johnkrish_GetWorkerInfo(Args _args)
HcmWorker       Worker;
Worker = HcmWorker::findByPersonnelNumber(“000085”);
info(strFmt(“Name : %1”,;
info(strFmt(“Telepon : %1”,;
info(strFmt(“Email : %1”,;
info(strFmt(“Departemen : %1”, Worker.primaryDepartmentName()));
info(strFmt(“Position : %1”, Worker.primaryPositionId()));
info(strFmt(“Address : %1”, Worker.primaryAddress()));

the result of this job is like this :



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s