Hello AX World,
Recently I have run into an issue. I am in the list page and trying to click through some ID to get to the form I expect and I get a completely different form opened. Strange…
Hey, if you don't have time to reading all this story, the bottom line is that the order of the relations of the table might be important for your form drill through. It may open a different form.
So I tried several different options.
First, I immediately checked FormRef property on the table. It was missing, so I set it right.
Building. Refreshing. Trying… no luck.
Then, I checked relations on the EDT of the primary key. Relations were not present, table reference either. So I set table reference as I could not set relations. It´s an obsolete thing since AX 2012.
Building. Refreshing. Trying… no luck again.
Then I started to look into code of the list page and it´s interaction class and asked about this problem on my twitter account and dynamics community. Got some hints but still… no luck.
Why I am getting a completely different form? FormRef was fine, all the references in the menu items and EDT were fine too. What´s wrong then?
And one though hit my head, what about table relations. Does the table have a relations to itself?
No, it does not! Quickly creating a relation to itself.
Building. Refreshing. Trying… no luck again.
Why? Quickly glancing at the relations list and noticing something interesting. There is one more relation where this single ID field is involved and it relates to another table which FormRef seems to be opening.
Could this be a problem? But why could this relation be used instead of the relation to itself that I just created? Is the order of the relations important?
Trying that out. Selecting my relation to itself and clicking Alt+Upfew times until it gets first in the order.
Building. Refreshing. Trying. Bingo!!!
Turns out the order of the relations is IMPORTANT.
Who would have though that?
I hope this helps you and saves some precious time of yours.
Be aware and take care!

Like
Report
*This post is locked for comments