web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

HCMWorker Person field Lookup

(0) ShareShare
ReportReport
Posted on by 1,271

Hello,

I have a custom table where I created a field Person with the same EDT DirPartyRecId in the properties as in the properties of the HCMWorker.Person field. Also I created relations to HCMWorker and other relations exactly as they are created on HCMWorker

I'd like my custom table's field's Person lookup to contain the same Persons as in HCMWorker but for some unknown reason it contains much more values. Some of them are from HCMWorker's Person field, some not. I also know that HCMWoker.Person field contains reference most likely to DirPErson.Name field via relations. IN table browser HCmWorker.Person field contains Names but the filed is int64 recid field. 

I think that my lookup contains all values from DirPartyTable because EDT DirPartyRecId contains FormHelo DirPArtyLookup form and there is a route table DirPArtyTable inside.

How to build lookup for mytable.person so that it contains only values from HCMWorker.Person. With other tables I created it easily by creating relations and nothing more. But here it doesn't work.

Thanks.

I have the same question (0)
  • Suggested answer
    greengrimms Profile Picture
    1,400 on at

    Hi Azat,

    You might want to take a look at HcmWorkerLookup class, which already implements logic to show new active workers, employees, contractors.

    You'll just need to override lookup method with this code for example:

    public void lookup()
    {
        HcmWorkerLookup::newOnlyActiveEmployeesWithinCompany().lookupWorker(this);
    }

    Hope it helps.

  • dark_knight Profile Picture
    1,271 on at

    Hi Danilo,

    Thanks for the answer. I've resolved the issue just by adding field based on the HCMWorkerRecid EDT to my custom table and creating relation to HCMWorker by RECID. Then I have added this field to the form and it automatically created reference group using DirPerson relation on HCWWorkerTable and it showed me related DirPerson name instead of the RECId. SO it would be easier from the start if I knew this standard EDT. Hope it'll help someone else.

    Thanks.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 288 Super User 2026 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 270 Most Valuable Professional

#3
Anton Venter Profile Picture

Anton Venter 217 Super User 2026 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans