How to use the Query object as an API in Business Central

Queries are a compelling object type within Business Central, as they allow us to retrieve records from one or more tables and then combine them in rows and columns into a single dataset.

This object type also allows you to perform calculations such as limiting the number of rows to retrieve, sorting data, and finding the sum or average of all the values in a specific column.

Source : Ivan Singleton
Read more…

D365 Business Central : Using Query to Get Distinct Values

When working with table data, there will be times when we need to retrieve a unique record value from the table (also called SELECT DISTINCT). Unfortunately, D365 Business Central does not provide this logic out of the box. We will need to find a way to do this ourselves.

Source : That NAV Guy
Read more…