Write a simple Display method in X++ to show the Employee name in the Fixed Asset module


Now you can see the AssetTableListPage form which is before writing the method. This is one of the easiest way to write a display method.

Write a simple Display method in X++ to show the Employee name in the Fixed Asset module. Easy way to create the Display method in x++ in AX

1)      Before writing the display code you need to check the relations between the two tables.
2)      Here I have taken the AssetTable and hcmworker tables and relationship between 2 tables is RecId. Same like that you need to check the relationship between the tables.

3)      Now you have to write the method from the specified main table, AssetTable is my main table here I’m going to write coding. Because AssetTable is the base data to get the username.

Write a simple Display method in X++ to show the Employee name in the Fixed Asset module. Easy way to create the Display method in x++ in AX

Public display NameAlias SearchName()
{
                Hcmworker        hcmworker;
                Assettable          assettable;
                Select firstonly hcmworker where hcmWorker.RecId == this.WorkerResponsible;
Return hcmworker.searchname();
}

To reduce your work timings use the copy method

Write a simple Display method in X++ to show the Employee name in the Fixed Asset module. Easy way to create the Display method in x++ in AX

4)      After completed the coding part just drag and drop the method to anywhere in the AssetTableListPage form.

Write a simple Display method in X++ to show the Employee name in the Fixed Asset module. Easy way to create the Display method in x++ in AX

5)      Then completion of all the things compile the AssetTable and AssetTableListPage Forms and synchronize it. Then now open the form check the field Search name will be placed in the particular place.
Enjoy with AX...!

1 comment:

  1. What’s up, I wish for to subscribe for this website to get latest updates, therefore where can I do it please help out.

    VBSPU BSc 3rd year result 2021
    MJPRU BSc 3rd year result 2021
    Uniraj BSc 3rd year result 2021

    ReplyDelete