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

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

  • André Arnaud de Calavon Profile Picture
    on at
    RE: CountryRegionCodes property: What are the valid entries

    Hi Annette,

    This is a great question. I can reproduce your error. But I don't know the answer.

    I do know that there are some dependencies related to the LogisticsAddressCountryRegion. For this reason there is the field 'IsImmutable' on this table.

    Probably there is a list in the kernel, but will try to search as well.

    There is no label with "Country Region Codes list", so I'm afraid it will be managed within the kernel.

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

    as per my understanding

    it validates from following list

    ftp.fu-berlin.de/.../iso3166-countrycodes.txt

    These are globally accepted code and it should be like this only, no custom code is allowed

    This list is not having XX as any valid Country ISO code

    Please verify and update us with your finding

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

    to validate that it validates from global list of codes

    please check the macro its not having any entry for 'TW'

    which is valid globally accepted code for TAIWAN, PROVINCE OF CHINA

    Still if you try to set the CountryRegionCode property for EDT with 'TW' it accepts

    Please verify and update us with your findings

  • André Arnaud de Calavon Profile Picture
    on at
    RE: CountryRegionCodes property: What are the valid entries

    Hi Annette,

    I could not find more than you already did. The country/regions are based on ISO Country/region codes (ISO 3166) as of August 4, 2007. In those 7 years some new countries were founded, like Curacao. I can imagine you would need to have some localized fields/menu items for the new countries as well.

    Personally I wonder why this list is not updated during the lifecycle of AX2012.

    Probably you can create a support incident at Microsoft (or your partner) as there are no other solutions provided which will help you.

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

    Excellent, Nitesh, thanks a mill!!!!!!!!!!!!!

    Tell me, how did you find that out???

    Do you also know, how this works? Does the AX kernel really check "live" in that file?

    For completeness sake:

    TW did work, though it's not in the macro

    XX was just an example that I was sure didn't exist, not a country I wanted to create :-)

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

    Hi André,

    thanks a lot for taking the time to investigate!

    And thanks for providing the Curacao example ... that one does NOT work, though it's in the list ... maybe Nitesh has some more details.

    Have a nice weekend!

    Annette

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

    Hi Nitesh,

    I checked with André's example of Curacao (CW). It's in the ftp file, but not in the macro. But CW is NOT accepted in the property sheet.

    So, it's still something else ... do you have any other tips?

    Your help is very much appreciated!

    Have a nice weekend!

    Annette

  • André Arnaud de Calavon Profile Picture
    on at
    RE: CountryRegionCodes property: What are the valid entries

    Hi Annette,

    I also tried with adding Curacao to reproduce your error. So I think like described earlier there is also a list in the kernel.

    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.

    I had also tried some other known ISO codes which were in the pre defined list. They were all accepted.

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

    Thank you very much for appreciation.

    If you like please help by marking these post as answer

    I find it out by analysing the way it is giving validation message and based on my understanding of dynamics AX

    For sure Dynamics AX don't go live to validate it, there must be some DLL or resource file which it looks for validation, I am still analysing which DLL or resource file  it is using to validate. or logic may be abstracted in Kernel

  • 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…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans