Question 160
A Dynamics 365 Business Central development project faces this issue: A developer tries to use a standard record FindSet loop for a grouped analytical report that spans several linked tables. Which action best addresses the requirement?
Explanation
Correct Answer
Use a suitable query object with explicit joins and aggregates where supported. is the best response because sQL-backed query datasets can reduce application-side row-by-row assembly. The proposed outcome is checked by: The query returns the required aggregates with validated source grain and acceptable performance.
Incorrect Answers
The option would apply to “A query should accept a user-supplied posting-date range without exposing the field in every returned row”. Query filtering can restrict records independently of displayed output columns. This question instead requires “Use a suitable query object with explicit joins and aggregates where supported”.
The proposed step is suitable when an API query publishes joined sales data but the team forgets to specify API metadata and versioning. It misses this case: A developer tries to use a standard record FindSet loop for a grouped analytical report that spans several linked tables. The relevant action is Use a suitable query object with explicit joins and aggregates where supported.
This alternative addresses the separate case “A query has a fixed company restriction that must not be removed by a caller using SetFilter”. Static data-item filters cannot be overwritten by ordinary query filter calls. The deciding requirement here is “Use a suitable query object with explicit joins and aggregates where supported”.