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)

Country Region Code Updation AX 2012

(0) ShareShare
ReportReport
Posted on by 500

We have renamed the 3 digit country region code with corresponding 2 digit country region code in ax 2012. After databse synchronization we had 3 digit as well as 2 digit country region code in the system. If we delete those 3 digit code and do databse synchronisation then still we get both country code(2 digit and 3 digit). If anybody can tell us that how we can prevent to create those 3 digit country region code during database synchronize, it will be appreciated.Tables are - LogisticsAddressCountryRegion and LogisticsAddressCountryRegionTranslation

*This post is locked for comments

I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    298,959 Super User 2025 Season 2 on at
    RE: Country Region Code Updation AX 2012

    Hi Tim,

    For more information about XDS you can read this whitepaper:

    go.microsoft.com/fwlink

    Also I wrote a blog with another example. Maybe you can pick the concepts from this post as well:

    www.kaya-consulting.com/.../restricting-legal-entities-based-on-assigned-organizations-ax-2012

  • Community Member Profile Picture
    on at
    RE: Country Region Code Updation AX 2012

    No worries -- just a n00b trying to make sense of this huge and complex product (haven't learned XDS yet).  Once am in this for a while (2 years?) I expect to be more conversant.  Cheers and have a great day.

  • André Arnaud de Calavon Profile Picture
    298,959 Super User 2025 Season 2 on at
    RE: Country Region Code Updation AX 2012

    Oh...yes indeed you can delete your own created companies. Then MS assumes no functionality is depending on this table,,, however you could create your own country specific features...

  • André Arnaud de Calavon Profile Picture
    298,959 Super User 2025 Season 2 on at
    RE: Country Region Code Updation AX 2012

    Hi Tim,

    I know your frustration about this topic. I don't feel you offended, neither did I. As I know that some functionality depends on this table, I would not delete, but hide the old countries with use of XDS. Recently I indeed had to add Aruba as country. The Antilles are not used anymore. If needed, we simply hide them.

    I think deleting some companies does not hurt when there are no features depending on it. But I don't take this risk.

  • Community Member Profile Picture
    on at
    RE: Country Region Code Updation AX 2012

    @Andre -- I'd noticed that when I add new countries (there are several) using the proper AX interface, that the IsImmutable flag wasn't being set.  That means I could delete the countries that I add, but not the ones that MS added.  Why is that?  Why is their data special?  It's just data (assuming all referential integrity rules are followed).  Just because someone at MS assumed that countries would never, ever go away doesn't mean they won't.  I appreciate MS's IsImmutable assumption, but it's incorrect as a rule.

    This webpage (geography.about.com/od/politicalgeography/a/missingcountry.htm) shows that lots of countries have ended their existence, such as – Burma (now Myanmar), Ceylon (now Sri Lanka), East and West Germany (now Germany), East Pakistan (now Bangladesh), Hawaii (now a US state), Persia (now Iran), Rhodesia (now Zimbabwe), Siam (now Thailand), North and South Vietnam (now Vietnam), Texas (now a US state), Tibet (now part of China unfortunately), USSR (broken up into 15 countries), Zaire (now DROC) and way, way more examples…

    Question:  At what point are we allowed to use REALITY as a guide to the world around us, and ignore the line in the sand that some misguided DBA pulled out of his a$$?

    Just imagine keeping East and West Germany in the table for the users to choose (because there isn’t an inactive flag in this table).  Which would they choose?  East Germany, West German, or plain old Germany?  Are your users smarter than a 5th grader?  Mine aren’t.   I choose science.

    My apologies if I offend.

    Best regards,

    Tim

  • André Arnaud de Calavon Profile Picture
    298,959 Super User 2025 Season 2 on at
    RE: Country Region Code Updation AX 2012

    Hi Tim,

    Please read all previous remarks above again carefully. The field IsImmutable has a name with a meaning. Immutable means "do NOT touch it". Other solutions were provided. Why do you ignore warnings? If you will encounter problems because of deleting the countries anyway, it is at your own risk.

    I think it is not a wise decision to bypass intended functionality. For sure not if the field has a meaningful name.

  • Community Member Profile Picture
    on at
    RE: Country Region Code Updation AX 2012

    @Zvika -- I'm happy with the pre-loaded list of countries, but not with the restriction that I can't delete one if it's a "deceased parrot" (montypython.50webs.com/scripts/Series_1/53.htm).  These SQL statements will allow the specified country code to be deleted -- though you should delete the country code using the AX Client to assure that any existing references are properly maintained (cascade/delete).

    update LogisticsAddressCountryRegion

         set IsImmutable  = 0

    where IsImmutable <> 0

    delete from LogisticsAddressCountryRegionTranslation

       where CountryRegionID = 'XXX'

           and LanguageID       <> 'yyyyy'

  • ZvikaR Profile Picture
    152 on at
    RE: Country Region Code Updation AX 2012

    I also suspect that the countries of BES, CUW, ESH, SSD and SXM are only relevant to 0,000001% of AX implementations.

    On the other hand, the fact that there is a pre-loaded list of countries, is valuable for 99% of implementations.

  • André Arnaud de Calavon Profile Picture
    298,959 Super User 2025 Season 2 on at
    RE: Country Region Code Updation AX 2012

    Hi Tim,

    At time of developing AX2012 it is possible that the ISO source had other contents. I have not checked this. We all know we are living in a world with changes. The missing countries and states can be added if needed.

    If you decide to have an old country code deleted, you can also use XDS for restricting this value.

    then you don't have to bypass intended AX logic.

  • Community Member Profile Picture
    on at
    RE: Country Region Code Updation AX 2012

    @Zvika -- the word "comprehensive" is inaccurate once you compare to the official ISO sources.  I found several differences; specifically ANT doesn't exist anymore, and the following country codes were missing: BES, CUW, ESH, SSD and SXM.  I also found errors in Canadian province codes and Mexican state codes compared against their respective postal websites -- another 10+ errors.  And, finally at least it's an issue in the US, they were missing the 3 Armed Forces state codes.  I appreciate the record sets being provided, however we need to be responsible to validate the values and correct them.

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Community Member Profile Picture

Community Member 4

#2
Guy Terry Profile Picture

Guy Terry 2 Moderator

#2
Nayyar Siddiqi Profile Picture

Nayyar Siddiqi 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans