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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

HcmWorker Primary Address retrieval via X++

(0) ShareShare
ReportReport
Posted on by 400

AX 2012 R2 CU7

This example gives me the primary address of a selected worker:

HcmWorker  worker;

str  addr;

addr = worker.primaryAddress();

However, the result is a string that contains all the address details concatenated together.  Is there a way to retrieve the primary address components for the given worker as seen in the DirPartyPostalAddressView?

I am looking for Street, City, ZipCode, State and ISOCode.

How can I link HcmWorker to DirPartyPostalAddressView?  Or is there a better way?

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Martin Dráb Profile Picture
    239,084 Most Valuable Professional on at

    DirParty::primaryPostalAddress(worker.Person).

  • Rick Hutchison Profile Picture
    400 on at

    Thank you kindly, Sir.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Basit Profile Picture

Basit 1

#1
GL-01081504-0 Profile Picture

GL-01081504-0 1

#1
Roya Profile Picture

Roya 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans