Building a query Object through Code.
Building a query object: Query objects in Dynamics 365 for Finance and Operations are used to build SQL statements for reports, views, forms, and so on. They are normally created in the AOT using the drag-and-drop functionality and by defining various properties. Query objects can also be created from the code at runtime. This is normally done when AOT tools cannot handle complex and/or dynamic queries. Build Query in X++: Queries can also be built dynamically with X++ code. Both approaches are used in standard applications. One advantage of making the query dynamics is that it can not be public in the AOT, and is protected against unintentional AOT changes. X++ Query Component QueryRun Query QueryBuildDataSource QueryBuildFieldList QueryBuildRange QueryFilter QueryBuildDynaLink QueryBuildLink QueryRun: use query Run objects to execute the query and fetch data. Query: The query object is the definition master. its own properties and has one or more dat...