Method to find record

Hello everyone,

I’m trying to create a method to find a person’s extension. The extension is located in table LogisticsElectronicAddress. I want to retrieve this from a form that has a temptable as it’s datasource and this temp table does get the worker number. I created a field in the temp table and now I just need to fill it.

I have a query that can get what I want if I have the worker number but I’ve tried many different methods in different spots and nothing is working. Can someone help? What kind of method should I use? Where should I put that method, form, data source, or right on the field?

I feel like this should be easy and I really want to understand how to do this because I feel like this could be very useful all over AX.

I got some help from a co-worker on this. He helped me create a display method on the table. That table is the datasource for the form. Then I made the field on my grid point to the table-datamethod and it works great!

Is that the temp table custom one? If so can also try by creating a new field for Extension as well and fill it(without using a display method). See \Data Dictionary\Tables\HcmWorker\Methods\phoneLocalServer, on how to get this value.