Defining our first query

In our first query, we will try to retrieve the items that our customers buy per month. To do so, we will use the Item Ledger Entry table as our main data source, but we will also use the Customer and the Item tables to get additional information from customers and items, such as their name or description.

First, let's define the main data source and the fields that will be retrieved:

  1. Open the Object Designer window in the Microsoft Dynamics NAV Development Environment and select the Query object type on the left pane of the Object Designer window.
  2. Click on New to create a new query. An empty Query Designer window will open.
  3. On the first line, in the Type column, choose DataItem from the drop-down list:
The first ...

Get Implementing Microsoft Dynamics 365 Business Central On-Premise - Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.