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)

CustTable and Relationships

(0) ShareShare
ReportReport
Posted on by 170

Hi all,

I was trying to create a fairly simple customer list report in Crystal but I see it won't be that easy due to location of some of the fields.

The CustTable is actually missing the customer name field.  For that, I have to use the DirPartyTable.  Problem is, there is no relationship between the two.

The other issue is pulling the customer addresses.  The CustTable also has no relationships to tables that contain the country and actual address.  These are the LogisticsPostalAddress table and the DirPartyAddress table.

What do I link the CustTable to in order to get full address, country and zip, as well as the customer name itself?

Any help is appreciated.

Thanks,

*This post is locked for comments

I have the same question (0)
  • Martin Dráb Profile Picture
    236,025 Most Valuable Professional on at
    RE: CustTable and Relationships

    The relation to address is set up for DirPartyTable, because the same logic is used for parties as well (such as vendors). The table is DirPartyLocation.

    Note that direct access AX database is strongly discouraged - your inability to use AX relations, table inheritance, the framework for date-effective data etc. are just a few reasons. Please think twice whether you're doing a wise thing at all.

    If you want to go ahead anyway, ensure yourself that you understand AX global address book, table inheritance and date-effective tables. Fortunately you'll find plenty of documentation.

  • Suggested answer
    David Massey Profile Picture
    on at
    RE: CustTable and Relationships

    The link to DirPartyTable is a foreign key relations ship on the field CustTable.Party = DirPartyTable.RecId

    Getting the address is more complicated as a customer can have multiple addresses and you need to determine which address you want to display. The primary address can be found using DirParty.PrimaryAddressLocation = LogisticsPostalAddress.Location.  In Crystal this will require additional work as LogisticsPostalAddress is date effective and may contain multiple records for the relationship based on ValidTo,ValidFrom dates

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
Guy Terry Profile Picture

Guy Terry 2 Moderator

#1
Martin Dráb Profile Picture

Martin Dráb 2 Most Valuable Professional

#1
Community Member Profile Picture

Community Member 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans