web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

AOT table relation from two fields to the same table

(0) ShareShare
ReportReport
Posted on by 282

Hi there

Running AX 2012 R3 CU9

This is probably a simple solution I'm missing - I have a table (we will call Table1), and I have two separate fields on that table with EDT CustCurrencyCode.

The problem is, the first one I added got a relation as expected, but the second one didn't, and it seems to dislike me adding the relation manually. As though there's a conflict with linking to the same table twice.

I get two error messages, one for each relation: 'RelatedTableRole' conflicts with another 'RelatedTableRole' on relation Currency on table [Table1]'.

I could technically force the lookup on my form to look at the currency table, but if it's possible I'd prefer to use the built-in functionality so it propagates anywhere else in the system this second field will show up.

I looked up some documentation on this: https://blogs.msdn.microsoft.com/axsupport/2015/12/17/how-to-add-a-new-relation-for-a-new-field-to-the-same-table-to-which-a-relation-already-exists-ax-2012/  but it looks like it's already a step ahead of where I am in that it works, but there are some pitfalls later on.

Any help would be much appreciated, if there's something I'm missing

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Mea_ Profile Picture
    60,284 on at

    Hi lukbel,

    RelatedTableRole property of the relation is populated automatically based on a table name. You have 2 relations with the same table and both have the same name, but it should be different, to fix that, just set RelatedTableRole for second one.

  • Suggested answer
    Rustem Galiamov Profile Picture
    8,072 on at

    Hi lukbel!

    You don't need to create relation to Currency table in your table relation node, because of EDT has it already.

  • Mea_ Profile Picture
    60,284 on at

    It was true for 2009, in 2012 you have to have all relations explicitly specified on a table, at least that's what BP says, why do you think that it is wrong ?  

  • lukbel Profile Picture
    282 on at

    Hey, it worked! Cheers ievgen

    I just set it to the name of the second field - is it just a placeholder string to define the relation?

  • Rustem Galiamov Profile Picture
    8,072 on at

    I don't say that it is wrong, i just want to say that using EDT which already has a relation it is enough for getting lookup on the field.

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Priya_K Profile Picture

Priya_K 4

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans