You just have to create a relation on your table that will link your field and HcmWorker.PersonnelNumber. AX will create the lookup for you.
Nevertheless I would store HcmWorker’s RecId and merely show PersonnelNumber in a reference group control (it can be set in the ReplacementFieldGroup property).
But still im having doubt for using Recid of HcmWorker in my table, If i use Recid of Hcmworker in my Table , But in the Table its Showing only RecId but in the form its showing Name by using Replacement Key . If RecId Hcmworker field is availabel in my table. But my doubt is if i want to filter an Employee personnel number in execute Query there will be only Recid Field there wont be PersonnelNumbe field in my table ,Let us assume, If there is an Enquiry Screen , User will enter only Employee Personnel Number , But in this scenario how to achieve from the Recid… Hope you understood my question…
You are missing the second part of his reply …which is that - "Nevertheless I would store HcmWorker’s RecId and merely show PersonnelNumber in a reference group control (it can be set in the ReplacementFieldGroup property).
Did the same as who and when? Do you really have the same question as AX Beginner three years ago?
I think you should rather create a new thread and explain your particular problem there. Make sure you have the right EDT, the right relation, the right form control bound to the right field.