Skip to the content


MVP Business Applications 2022-2023, seventh time in a row!

Thanks to Microsoft & MVP award team! Seventh year, given the numerous competitors, even more precious !! My thoughts for

10 Years

Dear readers, customers, students … dear fellow human beings.

It’s a little over 10 years that I got the opportunity to start my own business,
And through this I got the chance to get in contact with you. To work with you, to teach you, to talk to you, and, maybe the most important thing, to learn from you. To have a glimpse of the world through to culture you are part of, to experience it somewhat through your eyes.

Welcome – Carla Nederbragt 2022, 96 x 60 cm, Acrylic on cardboard

I am sharing a piece of my world through the paintings Carla Nederbragt created based on our talk about my work, my live and all that matters to me. Welcome again to my world and thank you for being a part of that.

Most kind regards,
Luc van Vugt

Into the open – Carla Nederbragt 2022, 56 x 40 cm, Acrylic on cardboard

Business Central working with dates

I want to report some information collected from several parts on the calculation of dates through dateformulaand calcdate, since they

Boolean buttons messed up in Chrome and Edge – what now?

There has been a lot going on about this the past couple of days – especially on Yammer and social media. This post is merely to help spreading the information. TL;DR As a picture says more than a 1000 words – let me steal a picture from Natalie Karolak (follow her, if you don’t already …

Working with AL-Go for GitHub preview

If you want to have the latest updates of AL-Go for GitHub, you can update your repository and use or ()

Search for a string (or a TAG) in .al files with Powershell

Search for a string (or a TAG) in .al files with Powershell Migrating, upgrading, recoding & refactoring the older versions

Business Central data exported in Azure Data Lake

Azure Data Lake? Azure Data Lake includes all the capabilities required to make it easy for developers, data scientists, and

Should Microsoft keep installing apps behind your back?

In a way – I’m not going to tell anything new here. Microsoft has been adding apps to your environment for many years already. It’s just that a recent discussion on Twitter basically led to a general – let’s say – “feeling”, that made me decide to share my view on the matter as well …

BCTechDays 2022

After too long (last edition was in 2019), we finally can look forward to a new edition of THE best technical conference for Microsoft Dynamics 365 Business Central: BCTechDays (formally known as NAVTechDays). If you run through my blog (or simply search for “NAVTechDays“), you probably notice that I’ve always been ecstatic about this conference. …

Addendum #03 – Simplifying API testing using basic authentication

Time for another addendum to : simplifying API testing.

In the first part of Chapter 13, Testing Incoming and Outgoing Calls, I discuss how you can go about testing incoming calls, i.e. calls to your APIs. In this I followed the approach by MS in testing their APIs:

  1. Set up your Business Central environment to use Windows authentication
  2. Remove all user and user-related data from the database (see )
  3. Deploy your extension(s) with your application and test code
  4. Run the tests with standard test runner Test Runner - Isol. Disabled (130451) as client and server processes run in different sessions

What was missing?

The major drawback in this approach is that the NST needs to be setup to use Windows authentications. This throws up a challenge when running tests in a pipeline as most probably the various parts of the pipeline are not run/triggered in your domain. UserPassword authentication would make it all so much easier.

Triggered by my Dutch Dynamics Community presentation, and later my Areopa webinar, , Arend-Jan Kauffmann – who else – suggested to use the following trick allowing the usage of basic authentication. In this we are assuming we’re using a docker container.

  1. When building the docker container for testing the APIs the user and password are known
  2. Adjust the script in such a way that it:
    • adds an extension which introduces a table in BC – let’s call it Test Setup – with a field in which the password can be stored
    • populates that field with the password
  3. Design your API tests to make use of this password (combined with the user)

I recorded this suggestion as an issue, i.e. , on the GitHub of my book to enable to work on it in due time. The unexpected effect, however, was that it was picked up be some else.

How was it fixed?

The same day I created the issue added to it:

Our development and our Azure DevOps pipelines environments are all setup-ed with Username/Password.

The idea is to create a small extension to have a eventsubscriber on the OnBeforeGetResponse and add BasicAuthentication to the API-call. With this maybe the standard tests of Microsoft would also be able to execute?

For now waiting for the event request here: 

It stayed silent for a time, not in the least as the issue still not had my priority. Apparently Arthur had not been sitting still, as two weeks ago he returned with a very pleasant message:

@lvanvugt: Good news, I have testing APIs working using basic authentication!

And continued with all details needed to get it indeed working. I only needed to find some time to get working on and get all the nuts-and-bolts set right, including the pipelines I had setup on the for the book.

I adopted into the GitHub repo as follows:

  1. Created a new branch called BC20 as, with the new event publisher OnBeforeGetResponse this will only work on BC20.1 and next
  2. Adopted the three new codeunits that Arthur suggests:

    • Contains subscriber to OnAfterInitializeWebRequestWithURL assures that the users credentials are added to the http call

    • Adds to each users in the database a Web Services Access Key

    • Sets up a new test suite API to contain our test codeunit(s) with our API tests and links a test runner to it, i.e. Test Runner - Isol. Disabled (130451). that disables test isolation
  3. Created a for Chapter 13 to run the tests and also a BC20 specific for the final app/test app setup to also include the API tests
    The challenge in the latter was to have both to original tests running with test isolation and the added API tests without isolation; you can learn from my notes on GitHub and the .yml file on what this all entailed.

A BIG thanx …

… to Arthur for making this possible and, of course, also one to AJ.