Using AOT Static Queries in D365 F&O: X++ Code Examples and Implementation

Rumman Ansari   Software Engineer   2024-09-22 04:02:13   1110  Share
Subject Syllabus DetailsSubject Details
☰ TContent
☰Fullscreen

Table of Content:

AOT Static Query in D365 F&O - X++ Code

Static queries are pre-defined queries that can be accessed from the Application Object Tree (AOT). In Microsoft Dynamics AX, static queries are located in the Queries node and contain the following primary subnodes:

The Application Object Tree (AOT) provides a graphical interface for creating queries. These are known as static queries. When a query is created using the AOT, the SysQuery and SysQueryRun classes are used behind the scenes.

  • Methods

  • Data Sources

  • Dependent Objects

  • Composite Query

Each Data Sources node has the following subnodes:

  • Fields

  • Ranges

  • Data Sources

  • Group By

  • Order By

  • Relations (only present in a child data source)

Methods

The Methods node displays all the methods available from a query. In this node you can add a new method to a query. You can also override methods on the QueryRun system class and add your own code to class methods inherited from the QueryRun class. Only new methods and overridden methods appear in the Queries node except for the classDeclaration method which is always present.