Microsoft Dynamics NAV 2013 introduces a new application object: the query. Although it is not yet, this new application object is meant to be "The Microsoft Dynamics NAV reading data object" in the future (notice the capital letter in the word "The"), so you better get familiar with it as soon as possible.
In this chapter, we will take an in-depth look at this new application object. We will go through the following topics:
Query is the name of a new Dynamics NAV application object introduced in Microsoft Dynamics NAV 2013. This application object is only meant to retrieve data from the database. It is a read-only object. It cannot modify, delete, or insert new data into the database.
Queries are the ninth object type in Dynamics NAV, although only seven are available in Dynamics NAV 2013, now that forms and dataports are gone.
There are many things about queries in Dynamics NAV that will make you just love them:
If you are a Dynamics NAV programmer and you have worked with the previous versions of Dynamics NAV, you will see the advantages and the possibilities of this new object right away.
The query object makes programming easier and for the lovers of performance, it makes data retrieval a lot faster.
In this chapter, we will show you how to define a query using the query editor and where and how to use queries on your developments. Once we know how to write and execute queries, we will compare them both in time and effort of development and in speed, against the old ways of retrieving the exact same data out of the application.