Queries
Reports have always been available in NAV as a tool to retrieve data from multiple areas within NAV, and to process and/or manipulate the data (through Insert, Modify, or Delete) with the option of presenting the data in a formatted, printable format. But formerly data selection was done in C/AL by defining filtered individual tables as datasets (retrieved from the database with simple T-SQL statements), and performing loops to find the data required for the purpose.
The new NAV 2013 Query object is created with performance in mind. Instead of multiple calls to SQL to retrieve multiple datasets to be manipulated in C/AL, Queries allow the developer to utilize familiar NAV tools to create advanced T-SQL queries.
A NAV developer can utilize the new Query object as a source of data both in NAV and externally. Some external uses include:
As a web service, which is Cloud-compatible
As a web service that can generate XML or OData (different from XML as it contains the field definitions and...