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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

Adding table relation to itself breaks navigation D365FO

(0) ShareShare
ReportReport
Posted on by 8

Hello,

I have next requirement and I tried everything but doesnt work:

I have a TABLE A with MainId and I want to create a relation with itself because this table record can be divided into multiple records and I need to store the information for the Main record Id. So I added the field ChildId and created relation TableA.MainId = TableA.ChildId.

But it breaks navigation on the forms and jumpRef method doesnt help either. It only helps when I set the property on the relation EDT relation to YES, but then it automatically adds condition to my query that I dont want.

I have a Form A which stores the data about Table A and menu item in its action pane to open the form to see related records from the same table. So Form B that opens has the same datasource as Form A (they both have Table A for datasource)

I added the code in init, init on a DS and executeQuery to filter by TableA.MainId , so to find its children. But it adds the condition '&& tableA.mainId = tableA.mainId' and then it doesnt return my records. When set EDT relation property to No it doesnt add that condition and it works well but then as I said navigation is broken.

I also tried removing the relation, so only have the field that  I am populating in code and then filter on it but it still adds the unwanted condition and doesnt work as expected. 

I also tried adding relation using RecId instead of MainId. I also tried adding two datasources on the opening form: TableA_ds and TableAchild_ds, that doesnt jelp either.

Is it because I have the same datasource on the main form and the form that I am opening from there ?

How can I fix that?

Thanks in advance

I have the same question (0)

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 689

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 478 Super User 2026 Season 1

#3
Syed Haris Shah Profile Picture

Syed Haris Shah 258 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans