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 :
Finance | Project Operations, Human Resources, ...
Answered

Difference between AOT Queries and X++ Queries in d365 Finance and Operations

(0) ShareShare
ReportReport
Posted on by 5

What is the Difference between AOT Queries and X++ queries ?

Give me some examples of AOT and X++ queries (Dynamic 365 Finance and Operations)

I have the same question (0)
  • Verified answer
    huijij Profile Picture
    19,811 on at
  • Verified answer
    André Arnaud de Calavon Profile Picture
    301,049 Super User 2025 Season 2 on at

    Hi Sai,

    Commonly, both will get data from the database. AOT queries are predefined, reusable objects. They can be used on forms, reports in coding , workflows and more.

    X++ queries are created with help of business logic and here you can create a query on runtime based on several variables. If you have the need to have a different query based on e.g. type of information you can consider an x+ query. The you can create it from scratch and define which tables to use to the data sources. You can also call an AOT query and modify it using x++, all depending on the requirements.

    If you need to use the same query again and again, it will be better to create an AOT query. To build a really advanced query, you might need over 50 lines of coding, To have the coding more readable, the AOT query will be better.  

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 544 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 450 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 250 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans