Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX forum
Suggested answer

How to get employee name from DirPersonUser?

Posted on by

Hi, I want to get employee name from Sales Order Header View, can anyone help me figure this out?

pastedimage1654523551818v1.png

Categories:
  • Martin Dráb Profile Picture
    Martin Dráb 225,588 Super User on at
    RE: How to get employee name from DirPersonUser?

    Sorry, I don't understand you question. Please elaborate.

  • faridz Profile Picture
    faridz on at
    RE: How to get employee name from DirPersonUser?

    Should i select first?

  • Suggested answer
    Martin Dráb Profile Picture
    Martin Dráb 225,588 Super User on at
    RE: How to get employee name from DirPersonUser?

    SalesTable.WorkerSalesResponsible is a RecId of HcmWorker table. And HcmWorker table has name() method returning the name.

    Therefore you need something like this:

    HcmWorker::find(salesTable.WorkerSalesResponsible).name();

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 287,989 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,588 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans