/ Microsoft / Add personnel number of worker in person lookup of user worker relation form in Microsoft Dynamics AX 2012

Add personnel number of worker in person lookup of user worker relation form in Microsoft Dynamics AX 2012

Learn, share and spread knowledge

A lookup is very essential to find out the value of the list so quickly and select it. There are many lookup we see in Microsoft Dynamics AX or in Microsoft Dynamics 365 for Finance & Operations. The lookup is very useful while we are filling the form in Microsoft Dynamics ERP systems. It helps us to find out the value quickly and enter it in the form. It helps to eliminate the data inconsistency and entering wrong data.

In the system administration of Microsoft Dynamics AX 2012, there is a form of User. In this form, if you click new Relation, a new form is opened which creates the relation between worker and user.

In this form there is a lookup for Person selection. In this lookup, we have to add Personnel number field which is in HcmWorker table and you can see it in Worker form in the System administration module in AX 2012.

Add a display method in DirPerson datasource of DirPersonUserLookup form. The method is as follows:

display HcmPersonnelNumberId PersonnelNumber(DirPartyTable _party)
{
    return (HcmWorker::findByPerson(_party.RecId).PersonnelNumber);
}

Then drag the method into the Grid of Main group as shown below:

If you have a better solution or if you found any ambiguity, please comment.

To do this in Microsoft Dynamics 365 for Finance & Operations, please see:

Blog: Click here

GitHub: Click here

Youtube Channel: Click here

 The road to success and the road to failure are almost exactly the same. – Colin R. Davis

0 POST COMMENT

Send Us A Message Here

Your email address will not be published. Required fields are marked *