✏️ Explanatory Question

What is the relationship between a Query and a View in D365 Finance & Operations?

👁 2 Views
📘 Detailed Answer
🟢 Easy
💡

Answer with Explanation

In D365 Finance & Operations, an AOT View is built on top of a Query.
The Query defines how data is fetched (datasources, joins, ranges, grouping), while the View exposes that query as a read-only, SQL-backed object that behaves like a table.

In short:

Query = logic (joins, filters, grouping)
View = representation of that query as a virtual table

How they work together

  • A View always has one Query (embedded in it)

  • The Query determines:

    • Datasources and joins

    • Ranges and group by

    • Order by

  • The View:

    • Does not store data

    • Executes the Query at runtime

    • Can be consumed by forms, SSRS, OData, and X++

Figure: Query and view inside it

What does this sentence REALLY mean?

“In D365 Finance & Operations, an AOT View is built on top of a Query.”

It means this:

👉 A Query is the brain (logic)
👉 A View is the face (output)

The View cannot exist without a Query. The Query decides what data and how data is fetched, and the View exposes that logic as a read-only virtual table.

Figure: AOT view IN D365 FO