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, ...
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
    303,679 Super User 2026 Season 1 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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 617

#2
André Arnaud de Calavon Profile Picture

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

#3
Syed Haris Shah Profile Picture

Syed Haris Shah 298 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans