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)

County code

(1) ShareShare
ReportReport
Posted on by 100

How can I find the correspondence between a County/Province and its code? For instance, I know that 90008 Zip Code is for "Los Angeles" with code 90 and I get it of two first numbers of ZipCode. Is there any form where I can see it straightly?

Thanks in advance.

*This post is locked for comments

I have the same question (0)
  • AXDeveloperJunior Profile Picture
    100 on at
    RE: County code

    This code could be useful, although I wanted it conversely: Get the code from a known County, what I find out with a substring of Zipcode.

  • Suggested answer
    Ajit Profile Picture
    8,755 on at
    RE: County code

    County names are not unique, like one county name can be there in multiple states.

  • Suggested answer
    Chaitanya Golla Profile Picture
    17,225 on at
    RE: County code

    Hi,

    For a given zip code you can get the county list through Address setup form located at the

    Path: Organization administration/Setup/Addresses/Address setup.

    ZipCode_2D00_CountyList.jpg

    You can get the county from a given zipcode through below job.

    static void Address(Args _args)
    {
    LogisticsPostalAddress postalAddress;
    LogisticsAddressCounty addressCounty;
    LogisticsAddressZipCode addressZipCode;

    while select addressZipCode
    where addressZipCode.ZipCode == "XYZ"
    join addressCounty
    where addressZipCode.CountryRegionId == addressCounty.CountryRegionId
    && addressZipCode.State == addressCounty.StateId
    && addressZipCode.County == addressCounty.CountyId
    {
    info(strFmt("ZipCode: %3, County: %1, Name: %2", addressZipCode.ZipCode, addressCounty.CountyId, addressZipCode.ZipCode));
    }
    }

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 2

#1
Martin Dráb Profile Picture

Martin Dráb 2 Most Valuable Professional

#1
Guy Terry Profile Picture

Guy Terry 2 Moderator

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans