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

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

CountryRegionCodes property: What are the valid entries

(2) ShareShare
ReportReport
Posted on by 1,653

Hi everybody,

does anybody know what has to be modified so that an additional country region code can be used for a table or EDT etc.?

Say I need to support a country with ISOCode XX (which is not available in core AX) ... how can I make a table or table field only show up in countries with that code - and I want to use the standard AX mechanism of countryRegionCode property on the table or table field.

I've tried the following:

  • create a new country region record > now I can create a new legal entity (or party in general) using that country (it would have been a surprise if this had worked ... after all, this is in the database and the entries could differ per partition)
  • add a new macro #isoXX to ISOCountryRegionCodes > now I can validate in code whether the current company is in country XX
  • added an XX node to resource LogisticsAddressCountryREgionData (I was running out of ideas) > didn't change anything, but my next partition should now also have the country region XX (didn't verify)

I have restarted the AOS service after each of these trials.

All this didn't help, I still get the message "'XX' is not defined as a value in the Country Region Codes list" when I try to type XX in the property.

I know there are other ways to do this, like create a new parameter, but

  1. this is not the standard way for doing it
  2. I'm really curious where the valid list is hidden

Is it really "hard coded" in the kernel? Or am I just blind ...

Thanks a lot for your input!

Annette

*This post is locked for comments

I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    297,559 Super User 2025 Season 2 on at
    RE: CountryRegionCodes property: What are the valid entries

    Hi Sebastian, Annette,

    In Dynamics 365, there is a change where it is possible to create new countries and link it with the CountryRegion property.

    You can read it on my blog: How to create a new country for localizing Dynamics 365 for Operations (dynamicspedia.com)

  • Annette Theissen Profile Picture
    1,653 on at
    RE: CountryRegionCodes property: What are the valid entries

    Hi Sebastian,

    yes, it's no solution - I just complimented him on trying out a creative idea, even though it didn't work. He invested time, trying to help me.

    And it all helped me, because I could then stop searching for a solution.

    As far as I know, there still is no solution to this in AX2012. Maybe in 365

    Have a nice weekend,

    Annette

  • Sebastian_Draese Profile Picture
    7 on at
    RE: CountryRegionCodes property: What are the valid entries

    Hello Annette,

    but Kevin wrote, that editing the xpo was no solution.

    is the an solution now ?

    kr,

    Sebastian

  • Annette Theissen Profile Picture
    1,653 on at
    RE: CountryRegionCodes property: What are the valid entries

    Hi Kevin,

    excellent, thanks for your help! Now I know for sure that I don't need to search elsewhere!

    And: Very creative idea, editing the xpo :-).

    Kind regards,

    Annette

  • Verified answer
    Kevin Kidder Profile Picture
    on at
    RE: CountryRegionCodes property: What are the valid entries

    Hello all - André asked me if I could check into this from the Microsoft internal perspective, and unfortunately André is correct that when we do the validity check on the Property sheet within the developer workspace, we are validating this from a pre-defined internal list of codes which is hard-coded in the kernel source code.  I have asked our development team about the possibility of updating this list with at least adding the newer ISO codes that have been created, and if I hear back from them that this may be possible I will update this thread with more information.

    But unfortunately right now you cannot create a new country specific feature that would depend on one of these new countries directly. I even tried to get creative and export the table and edit the XPO file and change it but the Import XPO also does the validation and won't allow the import to proceed either.

    Kevin

  • Annette Theissen Profile Picture
    1,653 on at
    RE: CountryRegionCodes property: What are the valid entries

    Hi André,

    sorry, I should have pointed out that my answer was relating to the following statement:

    [quote user="André Arnaud de Calavon"]

    When you install AX 2012 also the table with country/regions will be filled with pre-defined data. This is also not in the application, so likely in the kernel.

    [/quote]

    So, the resource file is used if you create a new partition (or a brandnew installation), at least that does not come from the kernel.

    But, this still doesn't solve the property-sheet issue, of course.


    (Sorry for the confusing thread)

    Annette

  • André Arnaud de Calavon Profile Picture
    297,559 Super User 2025 Season 2 on at
    RE: CountryRegionCodes property: What are the valid entries

    Hi Annette,

    I tried to add one record in this xml file. Also recompiled the system/restarted AOS, but I was still not able to use the new added country. The same error still prevents using a new country.

  • Annette Theissen Profile Picture
    1,653 on at
    RE: CountryRegionCodes property: What are the valid entries

    Hi André,

    I can at least answer from where the country/region table is filled in a new installation or partition ... It's the resource (AOT-resource) LogisticsAddressCountryRegionData. That's an XML file, contains the 2 and 3 char IsoCodes and labelIDs for the country names.

    (Found this in the class DirDataPopulation.insertLogisticAddressCountryRegions).

    So this at least is not in the kernel ... ;-)

    Thank you for cross-checking the Curacao example! And a big thanks for mailing to Microsoft, it would be really great if they would reply.

    Kind regards and have a nice Sunday evening!

    Annette

  • André Arnaud de Calavon Profile Picture
    297,559 Super User 2025 Season 2 on at
    RE: CountryRegionCodes property: What are the valid entries

    Nitesh,

    Annette is looking for the answer if it is possible to add a new country in the list and use this same new country to add country specific customizations/localizations.

    We all think it is in the kernel now.

    I have sent a mail to Microsoft asking to have a look into this topic. Maybe they will respond on this thread or will  provide the answer by mail.

    So an answer where it is possible to add TW is not really what she is looking for, neither the example of Curacao. These are just examples of countries that are working because they were or already in the ISO list or not working because this country is new.

    I already got the confirmation that the list was indeed not updated during the various versions of AX2012. Let wait for the confirmation if it is indeed in the kernel or if we overlooked something...

  • Community Member Profile Picture
    on at
    RE: CountryRegionCodes property: What are the valid entries

    Hi,

    Actually there are two list

    ISO 3166

    and ISO 3166-1

    Please review following link

    userpage.chemie.fu-berlin.de/.../ISO_3166.html

    I think Dynamics AX is looking into ISO 3166 list

    Please verify and update us with your findings

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…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Syed Haris Shah Profile Picture

Syed Haris Shah 9

#2
Martin Dráb Profile Picture

Martin Dráb 2 Most Valuable Professional

#2
Community Member Profile Picture

Community Member 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans