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)

What table/Fields to read to get the Country Code for a Customer

(0) ShareShare
ReportReport
Posted on by 583

Can anyone tell me starting with the CustTable, what fields and Tables do I join in order to get the Country Code (ie USD, CAN etc)

Steve

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Ludwig Reinhard Profile Picture
    Microsoft Employee on at
    RE: What table/Fields to read to get the Country Code for a Customer

    Hi Steve,

    These are basically the linkages described in the post that I added previously.

    You will probably not need the last two/three ones.

    n:1 > Customer

    n:1 > Global address book

    1:n > Party location relationship

    1:n > Locations

    1:n > Communication details

    1:n > Contact information and role relationship

    n:1 > Roles

    Best regards,

    Ludwig

  • Jie G Profile Picture
    on at
    RE: What table/Fields to read to get the Country Code for a Customer

    Hi Steve,

    CustTabe has a relation named "BirthCounty" with LogisticsAddressCounty. LogisticsAddressCounty has a relation "Country" with LogisticsAddressCountryRegion, who has a field "CountryRegionId".

  • SteveWhyte Profile Picture
    583 on at
    RE: What table/Fields to read to get the Country Code for a Customer

    Hi Ludwig

    I checked the link you sent me above but I don't see any article dealing with my problem.

    Can you point me in the right direction?

    Steve

  • Suggested answer
    Ludwig Reinhard Profile Picture
    Microsoft Employee on at
    RE: What table/Fields to read to get the Country Code for a Customer

    Hello SteveWhyte,

    Here is a blog post that shows you an example how the customer table can be linked with others to go down to the party location and related tables, such as location, communication details, etc. , which hopefully helps getting your linkage established.

    https://dyntips.com/2016/08/30/e-mail-invoices-with-a-smarter-dynamic-print-management-setup/

    In addition to this information, you can also take a look at the customer base data report that is available in the AR module. Maybe this report already includes all the information you are looking for?!

    Best regards,

    Ludwig

  • SteveWhyte Profile Picture
    583 on at
    RE: What table/Fields to read to get the Country Code for a Customer

    Hi Dinkar

    Can you recheck this as there is no method called countryRegionId()

  • Suggested answer
    startax Profile Picture
    1,845 on at
    RE: What table/Fields to read to get the Country Code for a Customer

    Hi,

    Check custtable method countryRegionId()

    custtable = CustTable::Find('ABC');

    info(strfmt("%1",custtable.countryRegionID()));

    It return customer primary address Country Region ID 

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