Book Image

Programming Microsoft Dynamics NAV 2015

Book Image

Programming Microsoft Dynamics NAV 2015

Overview of this book

Table of Contents (19 chapters)
Programming Microsoft Dynamics™ NAV 2015
Credits
Foreword
About the Authors
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Queries


Reports have always been available in NAV as a data retrieval tool. Reports have been used to process and/or manipulate the data (through the Insert, Modify, or Delete functions) with the option of presenting the data in a formatted, printable format. Prior to NAV 2013, data selection could only be done using C/AL code or DataItem properties to filter individual tables as datasets (retrieved from the database with simple T-SQL statements generated by the C/AL compiler), and to perform loops to find the data required for the purpose.

The Query object, new in NAV 2013, was created with performance in mind. Instead of multiple calls to SQL to retrieve multiple datasets to then be manipulated in C/AL, Queries allow us 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 the following:

  • As a web service that is cloud compatible

  • As a web service source for XML...