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

Notifications

Announcements

No record found.

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 942

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
    942 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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
Martin Dráb Profile Picture

Martin Dráb 565 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 450 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 250 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans