Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Table relations doesn't work as expected in AOT query

(0) ShareShare
ReportReport
Posted on by 2

Hi,

I created an AOT query for one table say table C that have to relations. one is a foreign key relation with table A and the second one is defined using two relations on Table B. Table B is also linked to table A using the same foreign key relation. let's say now I have two lookups on table C Lookup 1 and lookup 2.

Depending on the relation lookup 2 is filtered depending on the value of lookup 1. But for the same when I create and an AOT query and add ranges lookup 1 works fine but lookup 2 doesn't filter and shows all the records in the table.

The same thing is working correctly in another environment and I have compared everything but cannot see any difference. Any ideas?

Regards,

HA

*This post is locked for comments

  • dynamics developer Profile Picture
    2 on at
    RE: Table relations doesn't work as expected in AOT query

    Hi Suresh,

    If I had needed it on a form then I can easily override the lookup method. I need this to work on the query object as I will expose this to the user to filter the query using the select button.

    I know if I create a 1:1 join to the child table it will work but the issue is the same query is working fine in another environment. I compared all the system objects and MS hotfixes everything is same. I have been looking all day but couldn't figure out why it is working on the other environment but not on this one. I have tried recreating the table and relations and query but to no use.

  • Suggested answer
    Community Member Profile Picture
    on at
    RE: Table relations doesn't work as expected in AOT query

    Hi Haris Adil,

        I also faced this kind of issues initially, you can re create your query and try add your query in form.

    Thanks

    Suresh

  • dynamics developer Profile Picture
    2 on at
    RE: Table relations doesn't work as expected in AOT query

    6406.2.JPG

    The table filters but the query doesn't

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,884 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,748 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans