For decades, we have always retrieved full records from the database. Now we got an option to only query the fields we need. Check out this video:
Tag Archives: Query
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.
Use a Query Object if you have an urge for SQL in Business Central
The Query Object is often overlooked in Business Central, but it does give SQL’ish access to creating queries, check it out:
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.
Query Object: How Does It Work In Business Central?
In this post you will learn how to build a simple query in Microsoft Dynamics 365 Business Central. How to create advanced queries and how to use them via AL. Also, we will take a look at API queries and how to create them.
Do you know what a QueryCategory is?
Here’s a cool little trick to use Query Objects to create user interface, check it out:
Business Central API – Filter Child Array Values Using $filter Query Option
I had a difficult time finding an example of this type of API filtering using the OData $filter query option, so I wanted to share an example that I needed for a project.
For context, this is a very simple example of a Business Central API “child array” that I wanted to filter. Technically, I think that OData calls this an “expanded navigation property”.