How to get a reliable xRec
May11

How to get a reliable xRec

This tweet reminded me of a small but beautiful trick to get a reliable xRec in all the Modify trigger events. I had forgotten about how xrec/rec works with different type of events #MSDyn365 I will add this to my future BC quiz pic.twitter.com/Dyfd0cgAGy— Marcus Nordlund (@C4p0ne_) May 9, 2023 Which resulted in this new thread: I got feedback from @ajkauffmann on when xrec works so I… Continue Reading ajk’s Article...

Read More

Microsoft Dynamics 365 Business Central API v2.0 Reference

I’m delighted to introduce a new book I had the pleasure of co-authoring. A book that is aiming to be a full reference for all standard Business Central APIs. It contains a lot of information about APIs in general and in detail for every single API. And with details, I really mean details: not only examples of input and output but also a mapping of each field to their corresponding field on… Continue Reading ajk’s...

Read More
Prepare for the new invoice posting engine!
Dec06

Prepare for the new invoice posting engine!

Introduction In version 2021 wave 2 (v19) a new feature was introduced, called “Extend general ledger posting aggregations”. The reason for this new feature is that the table “Invoice Post. Buffer” could not easily be extended. This table is used to buffer the entries that will be created during a posting procedure. Entries are combined (amounts are added up) based on their values in the… Continue Reading...

Read More
Sales APIs returns error in a read-only request
Oct14

Sales APIs returns error in a read-only request

This twitter message reminded me of an issue that can occur with the sales APIs in Business Central. Did Microsoft Online change the default AccessIntent? Client calls and tells that Power BI failes with the error "Cannot modify a record. Current connection intent is Read-Only.".Changing the API to Read-Write on the Data Access Intent List resolved the issue.#bchelp

Read More
Sending email via SMTP in Business Central (online and on-premise)
Sep29

Sending email via SMTP in Business Central (online and on-premise)

It’s not a secret that Microsoft is forcing OAuth authentication for several products, including Exchange Online and Business Central Online. Over the last couple of days, I got multiple requests from partners who are now struggling with configuring SMTP in Business Central for Exchange Online. Let me start with reassuring you: Exchange Online still supports SMTP with basic authentication!… Continue Reading ajk’s...

Read More
Configuring Business Central for Azure Active Directory authentication and OAuth (2)
Feb23

Configuring Business Central for Azure Active Directory authentication and OAuth (2)

After configuring Business Central on-premises for Azure Active Directory authentication, as explained in the previous blog post, it’s now time to configure it for OAuth authentication with APIs and web services. Two options There are two options that you can choose from. An easy option that requires only one setting and a more complex option that requires extra configuration in Azure…. Continue Reading ajk’s Article...

Read More
Configuring Business Central for Azure Active Directory authentication and OAuth (1)
Feb21

Configuring Business Central for Azure Active Directory authentication and OAuth (1)

It’s a recurring question I get quite frequently: how to set up Business Central on-premises for Azure Active Directory authentication? And related to that, how to call APIs on Business Central on-premises with OAuth authentication? I know there are quite some sources out there like docs and blog posts about this topic. But I figured it would make sense to write it up myself as well, at least… Continue Reading ajk’s...

Read More
Service to service authentication in Business Central 18.3 – How to use in AL
Aug04

Service to service authentication in Business Central 18.3 – How to use in AL

Because I got the question if it was possible to use the client credentials flow in Business Central I decided to write a quick blog post about that as well. Codeunit OAuth2 provides a number of functions to acquire access tokens with different authorization flows, including the client credentials flow. The function AcquireTokenWithClientCredentials can be used for this purpose. Read more… Continue Reading ajk’s Article on...

Read More
Service to service authentication in Business Central 18.3 – How to use in C#
Aug04

Service to service authentication in Business Central 18.3 – How to use in C#

We continue the series about Service to Service authentication, aka Client Credentials Flow, with some tips about getting and using the access token with C#. Please see the previous posts in this series for more information about how to set up and test the Client Credentials Flow: Usage and license termsHow to set upTest with VS Code REST Client and Power ShellTest with Postman and… Continue Reading ajk’s Article on their...

Read More
Service to service authentication in Business Central 18.3 – How to test (Postman & Insomnia)
Jul27

Service to service authentication in Business Central 18.3 – How to test (Postman & Insomnia)

This is the next blog post in a series about service to service authentication in Business Central. Please see the previous blog posts for more information: Usage and license termsHow to set upTest with VS Code REST Client and Power Shell In this post, I want to give some tips on how to test with Postman and Insomnia. Both are tools that are being used by Business Central developers,… Continue Reading ajk’s Article on...

Read More
Service to service authentication in Business Central 18.3 – How to test (REST Client & PowerShell)
Jul13

Service to service authentication in Business Central 18.3 – How to test (REST Client & PowerShell)

In the previous blog posts I’ve described the usage scenarios around OAuth client credentials flow for Business Central and how to set it up. The next step is to test the APIs and with OAuth authentication to see if it works properly. In this post, I want to focus on the REST Client extension for VS Code and PowerShell. In the next posts, I will also cover Postman, Insomnia and C#. Version… Continue Reading ajk’s...

Read More
Service to service authentication in Business Central 18.3 – How to set up
Jul06

Service to service authentication in Business Central 18.3 – How to set up

In the previous blog post, I’ve described the usage scenarios around OAuth client credentials flow for Business Central. In this post, I want to show how to set up this new feature. The next blog post will contain code examples of how to use it. Please note that the steps explained below already work in the current version, but you need to wait for version 18.3 to be able to actually call… Continue Reading ajk’s...

Read More
Service to service authentication in Business Central 18.3 – Usage and license terms
Jul02

Service to service authentication in Business Central 18.3 – Usage and license terms

Business Central 18.3 is just around the corner, and it comes with a long-awaited feature: support for OAuth client credentials flow, aka service-to-service authentication. Many API integrations with Business Central SaaS are using the web service access key for basic authentication. But the 2022 release wave 1 (version 20) will remove this feature in favor of OAuth2. Since 2020 release… Continue Reading ajk’s Article on...

Read More
Extending standard APIs (2)
Apr16

Extending standard APIs (2)

In the previous blog post, I’ve demonstrated how to extend standard APIs by using them as a template for a new custom API that contains the customizations you want to do. While that approach works for most APIs, there are some APIs that are more complicated. I’m talking about APIs for sales and purchase documents. These APIs are special because they are not based on the standard tables Sales… Continue Reading...

Read More
Extending standard APIs (1)
Mar12

Extending standard APIs (1)

I’ve got this question so many times: how can we extend the standard APIs with extra fields? So I decided to write a blog post about it. Actually, it’s going to be two blog posts, because one would become too long. So here it goes… This could be a very short blog post. Microsoft disabled the option to customize the standard APIs in Business Central. Full stop… No, of course not!!!… Continue Reading...

Read More
Deprecation of Basic Auth for SaaS has been postponed to 2022
Jan07

Deprecation of Basic Auth for SaaS has been postponed to 2022

Good news: Microsoft decided to postpone the deprecation of Web Service Access Keys (Basic Authentication) until version 2022 wave 1. See confirmation here: https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/upgrade/deprecated-features-w1#web-service-access-keys-basic-auth-for-saas Originally the plan was to remove basic authentication with version 2021 wave 1…. Continue Reading ajk’s Article on their...

Read More
Batch calls with Business Central APIs (3) – Tips and Tricks
Jan05

Batch calls with Business Central APIs (3) – Tips and Tricks

This is the third post in a series about batch calls with Business Central. If you haven’t read the the other posts, then I recommend to do so. You’ll find the first post about basic operations with batch calls here. The second post about error handling and transactions can be found here. This third and final post will cover these topics: Reduce the size of the response payloadCombine… Continue Reading ajk’s...

Read More
Batch calls with Business Central (2) – Error handling
Dec22

Batch calls with Business Central (2) – Error handling

This is the second post in a batch series about batch calls with Business Central APIs. You can find the first one about the basic operations with batch calls here. In this post, I want to cover one of the most frequently asked questions about batch calls: what happens if one of the operations runs into an error? Will it stop further execution, will the already processed operations be rolled… Continue Reading ajk’s Article...

Read More
Batch calls with Business Central APIs (1) – Basic operation
Dec18

Batch calls with Business Central APIs (1) – Basic operation

A while ago I wrote about deep inserts with Business Central APIs. And I promised to write about batch calls too, so it’s about time to live up to that. Actually, I did some online sessions about it, like this one for DynamicsCon and also for Directions 2020. But I think it is still worthy to write it down. And because there is a lot to share about this topic, it’s my plan to write a series… Continue Reading...

Read More
What’s new in Business Central API v2.0
Dec10

What’s new in Business Central API v2.0

With the release of Business Central 2020 wave 2, a new version of the standard API set has been released. This new version got its own documentation here: https://docs.microsoft.com/en-us/dynamics-nav/api-reference/v2.0/. But while looking into it I was missing an overview of what has been changed between v1.0 and v2.0. And nothing was mentioned in the what’s new overview either. The only… Continue Reading ajk’s...

Read More
How to test Business Central webhooks
Nov28

How to test Business Central webhooks

I don’t think webhooks need an introduction. But for those who are new to the topic, here you can find the official documentation. In short, a webhook is a push notification. The “don’t call us, we’ll call you” scenario of web services. You tell Business Central in what resource you are interested (e.g. Item, Customer, etc.), and they’ll call you in case there is any change. With resource I…...

Read More
Business Central App maintenance policy tightened
Sep25

Business Central App maintenance policy tightened

Microsoft recently published information about maintaining apps and per-tenant extensions (PTEs) for Business Central. This rule can be simply summarized as “keep your apps compatible with Business Central or we are forced to remove your app”. This sounds a little bit harsh, but it makes sense if you think about it. Customers choose Business Central for several reasons, and one of those… Continue Reading ajk’s...

Read More
Service-to-service authentication for automation APIs in Business Central 2020 release wave 2
Sep14

Service-to-service authentication for automation APIs in Business Central 2020 release wave 2

One of the many new features in Business Central 2020 release wave 2, aka v17, is service-to-service authentication for automation APIs. What does that mean, how does it help us, and how does it work? Automation APIs are used for automating company setup through APIs. In terms of Microsoft, they can be used to ‘hydrate the tenant’. Think about creating a new company, importing and applying… Continue Reading...

Read More
Converting Enum values in AL
Jul16

Converting Enum values in AL

During my AL training classes, a frequently asked question is how to convert enum values to and from integer or text. So I thought it would be a good idea to share with you what possibilities you have. First of all, we need to understand the properties of an enum. Let’s look at an enum definition and see how it is constructed. With these properties, you can always get from ordinal to… Continue Reading ajk’s Article...

Read More
Deep insert with Business Central APIs (part 2)
Jul01

Deep insert with Business Central APIs (part 2)

In my previous post about deep inserts with Business Central APIs, I mentioned creating custom APIs that support deep inserts. I tried to create an example with Sales Header / Sales Line, but I gave up because I ran into too many issues. In this post I want to explain what you need for creating custom APIs that support deep inserts. I will do so with a simple Header & Line table… Continue Reading ajk’s Article on their...

Read More
Deep insert with Business Central API’s
May05

Deep insert with Business Central API’s

Recently I got a question from a partner: is it possible to insert a sales order and lines all at once with a Business Central API? And the answer to that question is, yes, that is possible. However, little documentation is available about this feature. The only documentation I could find is in an article about API limits in Business Central. One of the recommendations is to reduce the number… Continue Reading ajk’s...

Read More
Codeunit API’s in Business Central
Mar05

Codeunit API’s in Business Central

This blog post was on my list way too long… But now I found some time to sit down and write it. Disclaimer What I’m going to show here is officially not supported (yet). It is an undocumented feature that already exists for a couple of years. I believe it can even be used in Dynamics NAV 2018 and maybe earlier versions as well. In fact, Microsoft uses this feature themselves in the Power… Continue Reading ajk’s...

Read More
Using tables instead of table extensions
Mar03

Using tables instead of table extensions

Recently James Crowter wrote an excellent article about table extensions and how they affect performance. In short, table extensions are great for flexibility and ease of development, but performance decreases when the number of table extensions is adding up. Especially when table extensions are used for hot tables. With hot tables I mean tables that are used often, like Item, Customer, Sales… Continue Reading ajk’s...

Read More
Follow-up on secret values in a Business Central app
Feb04

Follow-up on secret values in a Business Central app

Wow… the community proved to be strong! About 10 days ago I asked to find the secret value in an app file and many of you really tried! Thank you so much! Before I move on, I would like to draw your attention to this idea. Please give it your vote! For more info, see below at the end of this post. What happened with the contest? Because I shared the source code, it was not hard to… Continue Reading ajk’s Article on...

Read More
Contest: find the secret value in a Business Central app
Jan23

Contest: find the secret value in a Business Central app

This is the first blog post about shipping a secret value in a Business Central app. I have prepared an app file that contains a secret value that will be stored into Isolated Storage. But I’m not 100% if this method is secure enough, and that’s why I need your help. Please, download the app file and find the secret value. If you succeed, then I need to harden it. If nobody can find the value… Continue Reading...

Read More
How to use the Excel Buffer in Business Central cloud
Jan17

How to use the Excel Buffer in Business Central cloud

A week ago, my friend Daniel asked a question on Twitter how to use the Excel Buffer to export data with Business Central online. Many functions on the Excel Buffer are only available for on-prem. When you change the target in app.json to ‘Cloud’ then those functions become unavailable. Luckily I had a code example available so I decided to put that on GitHub. But I thought it would make… Continue Reading ajk’s...

Read More
Where is the API v1.0 source code?
Nov01

Where is the API v1.0 source code?

With the April ’19 release of Business Central the standard API’s were released as version 1.0. According to the documentation, the beta version of the standard API’s remains available until April 2020 (Business Central 2020 release wave 1). TL;DR API v1.0 pages are not part of the base applicationThey are deployed as a hidden app, called _Exclude_APIV1_With navcontainerhelper you can… Continue Reading...

Read More
.Net types in AL are reference types
Oct11

.Net types in AL are reference types

This week I presented a session about .Net in the AL language at Directions EMEA 2019 in Vienna. And of course, I paid attention to the types in AL that represent .Net types, like TextBuilder, List, Dictionary, Http and JSON types. During the preparation of that session, I found a comment in the Microsoft documentation, below the documenation about HTTP, JSON etc., that I thought it could use… Continue Reading ajk’s...

Read More
New AL file type icon
Oct02

New AL file type icon

The latest release of Business Central not only comes with a new icon for the application, the AL language extension for VS Code also got a new icon: And not only that, but the AL language also includes a file icon theme, as you can see here: When you apply this file icon theme, you will get a small logo with AL in front of all .al files. I’m not going to discuss the… Continue Reading ajk’s Article on their blog New...

Read More

Debug without publishing – Kauffmann @ Dynamics 365 Business Central

Recently, with the Developer Preview – February 2019, a new feature was added to the AL extension for Visual Studio Code: Debug without publishing. This new feature brings more than you would expect. It is not just another option in the list of Publish and Publish without debugging. What’s the difference? With the option Publish and Publish without… Continue Reading ajk’s Article on their blog

Read More

How to install Docker on Windows 10 without Hyper-V – Kauffmann @ Dynamics 365 Business Central

Let me start by saying that it is quite hard to exactly understand the different Docker editions. Only this page is already confusing. There is a Community Edition (CE) and an Enterprise Edition (EE). But in the table there are three editions listed and none of them are named exactly the same as the names in the list. As far as I understand, the Docker Community… Continue Reading ajk’s Article on their blog

Read More

Controlling the size of a Control Add-In – Kauffmann @ Dynamics 365 Business Central

In the previous blog post about a PDF viewer for Business Central, I promised to come back with some tips. Here is tip #1: how to get full control over the size of a control add-in. Final code of this example can be found on GitHub. Control add-in example Let’s first look at a very simple example with no size settings at all and then gradually take… Continue Reading ajk’s Article on their...

Read More

PDF Viewer in Business Central – Kauffmann @ Dynamics 365 Business Central

Recently a question was raised by one of the MVP’s if somebody has an example of a PDF viewer in Business Central. That reminded me that I actually had an example, created almost one year ago. Should have published it way earlier! Anyway, I thought it still makes sense to polish that thing and share it. I’ve explored several ways to display a PDF as part… Continue Reading ajk’s Article on their blog

Read More
Outbound HTTP calls blocked in Business Central Sandbox
Nov05

Outbound HTTP calls blocked in Business Central Sandbox

Recently I received a number of questions from people who were using the first self-monetization example code I created about a year ago. They received an error message when installing the app: Callback functions are not allowed. This error happened because there is code in the install codeunit to do an outgoing HTTP call to a webservice. In the same period, people started to report… Continue Reading ajk’s Article on their...

Read More

Outbound HTTP calls blocked in Business Central Sandbox – Kauffmann @ Dynamics 365 Business Central

Recently I received a number of questions from people who were using the first self-monetization example code I created about a year ago. They received an error message when installing the app: Callback functions are not allowed. This error happened because there is code in the install codeunit to do an outgoing HTTP call to a webservice. In the same period,… Continue Reading ajk’s Article on their...

Read More

Isolated Storage in your Business Central App – Kauffmann @ Dynamics 365 Business Central

A question I get quite often during my AL development workshops or coaching sessions for partners is this: can other apps access data that is stored in my app? And the short answer is: yes, they can. There is no way to avoid that. Let’s not go into the discussion why partners want to prevent others from peeking into data stored in their tables and or to see… Continue Reading ajk’s Article on their...

Read More

time to kiss C/SIDE goodbye – Kauffmann @ Dynamics 365 Business Central

Last week I attended Directions North America 2018 in San Diego, CA. It was the best Directions NA I’ve ever attended. I’m not going to go over all kinds of “what’s new in the next version” because others already did, and probably better than I can. Like Waldo did on his blog (he has a good memory indeed). Some people think there was no big news at… Continue Reading ajk’s Article on their blog

Read More

Object Licensing with Microsoft Dynamics 365 Business Central – Kauffmann @ Dynamics 365 Business Central

My last blog post was about the possibility to create tenant customizations for Dynamics 365 Business Central. That raised some questions about licensing. Which I perfectly understand considering where we come from. With Dynamics NAV on-prem we have to license every single object. A base set of objects like Pages and Reports come for free with Page Designer and… Continue Reading ajk’s Article on their blog

Read More

Microsoft Dynamics 365 Business Central Tenant Customizations – Kauffmann @ Dynamics 365 Business Central

Maybe I’ve missed some announcements, and maybe others also blogged about this and I totally missed it. But so far I have not seen this message: with Dynamics 365 Business Central it is possible to customize tenants to individual needs. What does that mean? Tenant customizations That means that you can create an extension for a single Dynamics 365 Business… Continue Reading ajk’s Article on their...

Read More

Table trigger events in Dynamics 365 Business Central – Kauffmann @ Dynamics 365 Business Central

With this blog post, Microsoft announced the March update of the Developer Preview. The usual Docker images will be publicly available on April 2nd and will contain the Microsoft Dynamics 365 Business Central release candidate. In the blog post Microsoft listed a number of nice improvements and a lot of fixed issues. However, one of the improvements didn’t… Continue Reading ajk’s Article on their blog

Read More

Dynamics NAV 2018 Image Library – Kauffmann @ Dynamics 365 Business Central

A new version of Dynamics NAV requires a new version of the Dynamics NAV Image Library. Well, here it is! It is available for download at Mibuso. This time I put a little more effort in the tool. Instead of just adding the images of Dynamics NAV 2018, I’ve also added some more features. First of all, the images of Dynamics NAV 2018 are included (of course…)…. Continue Reading ajk’s Article on their...

Read More

The different AL Extensions versions for Visual Studio Code – Kauffmann @ Dynamics 365 Business Central

A common question asked these days is why there are different versions of the AL Extensions for Visual Studio Code. With this post I try to explain what the differences are and what version you should choose when developing Extensions v2. In fact there is just one AL Extensions, shipped in different versions. At the moment of writing these versions are… Continue Reading ajk’s Article on their blog

Read More

How to connect Visual Studio Code with NAV 2018 – Kauffmann @ Dynamics 365 Business Central

Last couple of days, I got a number of questions from people that all came down to the same issue: how to set the correct settings in the launch.json so Visual Studio Code can connect to NAV 2018. In most cases I saw the same mistake being made. A logical mistake, but also one that leaves you probably wondering why it works that way. Let’s assume you have… Continue Reading ajk’s Article on their blog

Read More

Running NAV docker containers on a local Hyper-V Virtual Machine – Kauffmann @ Dynamics 365 Business Central

There are already a lot of blog posts about running Dynamics NAV on Docker and how to deal with it. Here are some sites you should definitely start with: https://blogs.msdn.microsoft.com/freddyk/tag/docker/This is the best source to get up to date on the current status of NAV on Docker images. https://www.axians-infoma.de/navblog/For in-depth tips and tricks how… Continue Reading ajk’s Article on their...

Read More

Thoughts on Dynamics 365 “Tenerife” & NAV 2018 – Kauffmann @ Dynamics 365 Business Central

It’s the week after. Busy weeks lay behind, Directions EMEA was this week in Madrid and two weeks before we had Directions US in Orlando, Florida. A lot of sessions and workshops have been delivered. Together with the Cloud Ready Software team we delivered about 20 sessions on each conference. If you have to present a lot of sessions yourself, it is of course… Continue Reading ajk’s Article on their...

Read More