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 :
Microsoft Dynamics AX (Archived)

Address formats different for countries other than current company

(0) ShareShare
ReportReport
Posted on by

I've been presented a requirement where the client only wants printed addresses to include the country/region ID if said country/region ID is different from the country/region ID of the primary address for the current legal entity in which the current user is working.  This feels like a sufficiently 'obvious' request that I'm hoping it may be covered somewhere in standard AX, but I can't see anything in the Organisation administration > Setup > AddressesAddress setup or Organisation administration > Setup > Global address bookGlobal address book parameters forms that might fit the bill.

My first thought was to modify the LogisticsPostalAddress::formatAddress method to implement this as a customisation, but given that addresses aren't specific to a company/DataArea, that simply doesn't make sense.  Additionally, it makes me more certain that this probably isn't a standard piece of functionality.  Hence, can anyone think of a smarter way to do this than adding a new public static method to the LogisticsPostalAddress table (i.e. formatAddressForInternationalMail) that's pretty similar to formatAddress, but conditionally includes the country/region ID?

*This post is locked for comments

I have the same question (0)
  • Verified answer
    André Arnaud de Calavon Profile Picture
    301,037 Super User 2025 Season 2 on at

    Hi Rich,

    You can try to create a runtime function to remove the Country part or do new format of the complete address in case the address is within the same country as the current legal entity. Before going into this you need to be aware that this will have a minor performance penalty. When it comes to large number of addresses that needs to be used in some process, another approach like creating a new combined address field for internal country might be quicker. But also here a statement is required to determine if the standard address field or the new field must be used.

  • Community Member Profile Picture
    on at

    Thanks André.  Creating a new column in the table for [DomesticAddress] and leaving the existing [Address] column as is will probably be how I approach this.  That way, the LogisticsAddressFormatProcess::run method will still work with the address formats as configured in standard functionality: I'll just have to customise the class to populate the [DomesticAddress] as per [Address], with the exclusion of Country/RegionID.  Whilst this will require a check every time the print address is requested, a helper method for that to compare the address country to the current company country should make everything relatively neat in terms of abstraction.

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 > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans