You need to add a conditional statement into a query object.
Which class should you use?
A. Query Item
B. Query Build Data Source
C. Query
D. Query Range
Correct Answer: C
Explanation/Reference:
In Microsoft Dynamics AX, you can create a query to retrieve data by using the query classes.
Note: The Query class enables you to create, read, update, and delete X++ code and metadata.
The Query class embodies the structure of a query. Objects of this type are not used for fetching records from the database. Instead, use a QueryRun object that may be assigned a query object. The dynamic behavior of a query is defined by the . The static behavior is defined by the Query class.
Queries contain one or more data sources that correspond to tables in the database. The data sources are specified by using QueryBuildDataSource objects.
Incorrect
Not B: The QueryBuildDataSource class provides the building blocks that queries are made of. Data sources are arranged in hierarchies that define the sequence in which records are fetched from the tables that are assigned to the data sources. Each data source defines the order in which the records are fetched, and also the criteria that must be met by the selected records. This class lets you create, read, update, and delete X++ code and metadata.
Not D: Query range value expressions can be used in any query where you need to express a range that is more complex than is possible with the usual dot-dot notation (such as 5012..5500).
Reference: How to: Create Queries by Using X++ [AX 2012]
Explanation/Reference:
In Microsoft Dynamics AX, you can create a query to retrieve data by using the query classes.
Note: The Query class enables you to create, read, update, and delete X++ code and metadata.
The Query class embodies the structure of a query. Objects of this type are not used for fetching records from the database. Instead, use a QueryRun object that may be assigned a query object. The dynamic behavior of a query is defined by the . The static behavior is defined by the Query class.
Queries contain one or more data sources that correspond to tables in the database. The data sources are specified by using QueryBuildDataSource objects.
Incorrect
Not B: The QueryBuildDataSource class provides the building blocks that queries are made of. Data sources are arranged in hierarchies that define the sequence in which records are fetched from the tables that are assigned to the data sources. Each data source defines the order in which the records are fetched, and also the criteria that must be met by the selected records. This class lets you create, read, update, and delete X++ code and metadata.
Not D: Query range value expressions can be used in any query where you need to express a range that is more complex than is possible with the usual dot-dot notation (such as 5012..5500).
Reference: How to: Create Queries by Using X++ [AX 2012]