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)

Table relations defined in one table but not the other?

(0) ShareShare
ReportReport
Posted on by 135

I'm confused with table relations.  For example, if you look at the relations for CustTable, there is nothing for SalesLine, but if you look at the SalesLine table's relations, you see the relation to CustTable.  Is there a reason this relationship is only documented in the SalesLine table's relations?

Also, is it possible to have relations that are not defined in the Relations section for either table, and, if so, what are the ramifications? 

Also, are these relations used when defining link types for data sources?  Otherwise, when you specify something like "inner join", what are you even joining on?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Satish Panwar Profile Picture
    14,669 Moderator on at
    RE: Table relations defined in one table but not the other?

    SalesLine is first level data source (though it's linked with SalesTable), the automatic relation is being used. Expand the SalesLine data source and notice the next data source i.e. logisticsPostalAddressDeliveryLine and you will see joinrelation field and join table. The property / field / and how relations are defined vary in the application. After all this, what are you trying to do? Are you trying to create a form.. if yes, try to add multiple data source and see if you get data as expected or something is wrong. If it's wrong, then try to identify where to define relations etc, just understanding where is not going to help you unless you try to do it.

  • Mark Boy2 Profile Picture
    506 on at
    RE: Table relations defined in one table but not the other?

    Did you see the join datasource Option ?

  • AXGreenHorn Profile Picture
    135 on at
    RE: Table relations defined in one table but not the other?

    3223.salesline.PNG

    Satish, this is the SalesTable form.  You see how the SalesLine is set to join with the SalesTable.  But I do not see an option to use the table relations.

  • Suggested answer
    Satish Panwar Profile Picture
    14,669 Moderator on at
    RE: Table relations defined in one table but not the other?

    Hi AXGreenHorn,

    Please let us know if you have any further questions on this thread.

    Thanks,

    Satish Panwar

  • Suggested answer
    nmaenpaa Profile Picture
    101,160 Moderator on at
    RE: Table relations defined in one table but not the other?

    CustTable stores customer master data.

    If any table includes Customer account field, a relation to CustTable should be defined in that table. This is how relational databases work.

    But, you don't need to change the definition of CustTable (by defining new relations) every time a new table with CustAccount field is introduced.

  • Mark Boy2 Profile Picture
    506 on at
    RE: Table relations defined in one table but not the other?

    Oh, Satish said the relation using on the query(datasource)/form(datasource) and so on , but you only focus on the table~

    for example:

    when you create a form or query, you add the InventTable and InventTrans to datasource,

    you just go to the sub-datasource property and select the use relation to change “yes”

    then both of tables's relation will be created.. do not create by manual.

    In addition , this is only possible if there is already a table association relationship.

  • Suggested answer
    Satish Panwar Profile Picture
    14,669 Moderator on at
    RE: Table relations defined in one table but not the other?

    Agree. The screenshot that you I provided above is from Queries. To which data source the above form linked to? I think it's form data source. If that's what it is, take a look at SalesTable form, expand the salesTable data source, go to next data source underneath salesTable and see the property join relation. The property name is different based on what you look at. Can you share complete screenshot that shows your AOT objects and your property if above response doesn't help you much.

    Thanks,

    Satish Panwar

  • AXGreenHorn Profile Picture
    135 on at
    RE: Table relations defined in one table but not the other?

    Satish,

    I'm sorry, but I can't accept your answer yet because I cannot find a similar option in AX 2012 to only use the table relations.  Here is what I see:

    data-source.PNG

    I don't think any of these properties are the equivalent.

  • Suggested answer
    Satish Panwar Profile Picture
    14,669 Moderator on at
    RE: Table relations defined in one table but not the other?

    Glad that it helped. Please see below (it's from D365 but similar property will exist there as well. Note - I have highlighted the second data source in my query. For first data source "CustTable", the property doesn't apply and doesn't exists. Please click 'Yes' against the answers that helped you.

    pastedimage1562960234547v1.png

    Thanks,
    Satish Panwar
    Please help verify answer(s) if they guide you in right direction so other community members can also benefit from your question with verified answer.

  • AXGreenHorn Profile Picture
    135 on at
    RE: Table relations defined in one table but not the other?

    Everything you said makes sense, however, I do not see the "use relations" property that you talked about.  Can you screenshot where you are seeing that?

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…

Mansi Soni – Community Spotlight

We are honored to recognize Mansi Soni as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Syed Haris Shah Profile Picture

Syed Haris Shah 9

#2
Mea_ Profile Picture

Mea_ 4

#3
KP-31070522-0 Profile Picture

KP-31070522-0 3

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans