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)

Form Datasource with Multiple Relations to Same Table

(0) ShareShare
ReportReport
Posted on by

I need to create to separate form datasource relations to the InventTable from a custom table. The custom table is itself the many table to InventTable, but is also related back to InventTable by a second associated ItemId. I don't see a way of doing that.

*This post is locked for comments

I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    301,075 Super User 2025 Season 2 on at

    Hi Steve,

    Have a look at the table SalesTableLinks. This table has a similar scenario with SalesId's. On the table you can define the relations.

    If you need to use it on a form and it is using the wrong relation, you can use the "clearDynalinks" method on the (QueryBuild)Datasource and add your own correct linked field.

  • Community Member Profile Picture
    on at

    That doesn't work. The grid form comes up blank.

    I am starting from Released Products. There is a button in the action panel to bring up the contents of the custom table in a user-enterable grid. That relation is InventTable.ItemId to CustomTable.ItemId.

    In that grid, there is a CustomTable.ParentItemId field, which allows users to pick a "parent" Item pertaining to CustomTable content. Based on that value, they want the product name displayed for that ParentItemId.

    I don't know how to get that product name to display. If I add InventTable to the datasource, it relates back to the item on the Released Products form.

  • Verified answer
    André Arnaud de Calavon Profile Picture
    301,075 Super User 2025 Season 2 on at

    You are changing the question now... Your initial question does not mention the product name.

    Can you fully describe the requirement and what you have achievedso far?

    If it is only the product name, you can create a display method on the new CustomTable to retrieve it based on ParentItemId.

  • Community Member Profile Picture
    on at

    Thanks. Let me try that.

  • Community Member Profile Picture
    on at

    Thank you.

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
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans