Home » Microsoft » MB6-704 » Which function should you use to validate that the elements of type query exist in the Application Object Tree (AOT)?
You are developing logic that will use a query object to fetch data from a database.
Which function should you use to validate that the elements of type query exist in the Application Object Tree (AOT)?
A. Query Build Data Source
B. Query
C. QueryStr
D. QueryRun
Correct Answer: C
Explanation/Reference:
QueryStr retrieves a string that represents an existing query. This function is a compile-time function, which is a metadata assertion function. Compiletime functions take arguments that represent entities in the Application Object Tree (AOT) and validate these arguments at compile time. They have no effect at run time.
Incorrect:
Not D: The QueryRun class traverses tables in the database, fetches records that satisfy constraints that are given by the user, and helps to gather such constraints from user input.
Reference: queryStr Function [AX 2012]