Inexplicable delays when calling (OnPrem) Business Central API’s (and how to solve it)

We always try to upgrade all customers to latest release – and we encountered some delays in API communications, which seemed to got worse at every new upgrade. At some point, every API call took from 500 to 1000 milliseconds. I think we all agree that this is FAR to high. Even for a simple call, like getting the companies, it took so long.

Source : Waldo’s Blog
Read more…

Using OAuth 2.0 to connect Business Central APIs and Web Services in Power Automate – OAuth in HTTP action

As you might know, Web Service Access Keys (Basic Auth) for Business Central Online has been removed with Business Central 2022 release wave 1. We are gradually transitioning from Basic Auth to OAuth over the year.

And last year we discussed how to use OAuth 2.0 to connect Business Central APIs and Web Service in Postman.

Source : Dynamics 365 Lab
Read more…

Sales APIs returns error in a read-only request

Apparently, the PowerBI connector is adding the header Data-Access-Intent: ReadOnly to requests when loading data from Business Central. While this is a good practice in general for GET requests, you may run into an error message with the sales APIs. This applies to salesQuotes, salesOrders and salesInvoices.

Source : Kauffmann @ Dynamics 365 Business Central
Read more…

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…

Working with SOAP API and XML in AL. Generic API codeunit.

The purpose of this post is to learn the basics of working with XML and SOAP in AL. Besides, we’ll look at my suggestion of the generic API method SendRequest(), which fits most APIs without authorization. The authorization itself is not difficult to add to the general logic, but in the post, they are not considered due to their large number and often unique logic

Source : Volodymyr Dvernytskyi
Read more…