Next conf session: DynamicsCon 2021

The next Microsoft Dynamics 365 Business Central conference has just been planned, and I already sent a submission for my session!

Link to the submission: AL Language: Coding for performance v2 and yes, I am no longer part of a rookie speakers track 😉 )

The conference takes place from 20th to 23rd of September 2021! You can register for the event directly on The voting for the sessions will be during July, and I hope that you will support my session with your vote.

DynamicsCon Sept. 2021 is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals. DynamicsCon is one of the most popular and known tech conferences for all Dynamics products (Business Central (BC), Customer Engagement (CRM), Financial & Operation (F&O), Dynamics GP and Power Platform).

And what the session will be about?

Topic: AL Language: Coding for performance v2
Why this is a v2 session? I have changed the session’s content to be more focused on Partial Records and their statistics (compare to my last conf. session available on my blog In the beginning, I will summarise some essential tips & tricks about the performance patterns (what you should/should not do), but in more than 2/3 session time, I will show you details about:

  1. What the partial records are & how to use them
  2. How the partial records are translated to SQL, with detailed statistics on new examples
  3. Changes in BC18 related to Partial Records
  4. Examples

ALRM: AL ID Range Manager has been updated!

I have just released a new version of ALRM extensions for VS Code as well as for Business Central. The latest versions are available for download on my GitHub and also directly in VS Code marketplace for free for any developers in AL Language.

And what is new?
VS Code ALRM Changelog
D365 Business Central ALRM Changelog
The most interesting changes are
– New supported AL object types: Control Addin & DotNet AL Object
– Improvements of extensions with “Ranges per BC Instance” assignable range
– Improvements to parsing AL objects

What is ALRM: AL ID Range Manager

How to setup & use ALRM: AL ID Range Manager

How to start with ALRM: AL ID Range Manager

AL ID Range Manager is VS Code & Microsoft Dynamics 365 Business Central extensions made for developers who need to manage their object/field IDs across multiple projects (or in the multi-developers environment). If you want to know more about this project, check my previous article.

The project was originally created as a part of our project for hackathon Coding4BC that took place in November 2020 (

How to set up ALRM

Setting up ALRM: AL ID Range Manager is a super easy task. You have to set up Assignable Range in the Business Central extension and set your connection to the Business Central from your VS Code development environment.

Check these two videos that describe all things you should know.

AL ID Range Manager in D365 Business Central
AL ID Range Manager in VS Code

Quick start with ALRM: AL ID Range Manager

Once you have everything set, you can start benefit from this extension. It does not matter whether you are building the solution from scratch or starting with an existing project.

“Initialize” & “Synchronize” commands in VS Code
“New Object” & “New Object Extension Field or Value” commands in VS Code

Business Central Bootcamp is the past

Last Saturday, I had a session at another great tech conference (unfortunately, due to Covid still online) – Business Central Bootcamp (list of all sessioon is here).

Once the recordings are available, I will give you some tips about other sessions that were the most interesting from all tracks from both days.

Business Central Bootcamp, 16th – 17th April 2021
AL Language: Coding for Performace
Presenter: Ing. Tomas Kapitan;

The recordings will be available publicly, as usual, three months after the conference (during July) directly on the Power Platform Community youtube channel.

For now, you can download my slides from the session: BCBootcamp-slides.pdf or you can check selected slides on screens below

Import various file types with Interfaces

A few weeks ago, I described a solution for importing an Excel file to the Business Central using Excel Buffer in AL Language (see here). In today’s article, we will look at how to build a more complex solution that can be used for file imports without the needs to identify the imported file type.

The example is available on my GitHub (here). In the next parts, we will look in details at some of the parts from this repository.

Enum & Interface

First of all, we need to create an interface that describes which procedures must be implemented by each file format implementation (if you want to know more about AL Language enums & interfaces, check my previous articles about Enum Data Type or the series of Interfaces in AL (part 1), (part 2) and (part 3)).

For our example, we need only two procedures. You will probably need some more procedures to make a (super) universal solution in real extension, but two methods are enough for our example.

So every implementation that uses this interface has to implement ImportFile procedure (that accept Code[20] and returns temporary CSV Buffer) and FieldSeparatorSupported procedure (returns boolean).

 /// <summary>
 /// Interface TKA IImport File Format.
 /// </summary>
 interface "TKA IImport File Format"
     /// <summary>
     /// Import lines from the select file. The file is selected by user. Based on implementation, some other selections may be neccessary (specific sheet/list/range, ...).
     /// </summary>
     /// <param name="ImportConfigurationCode">Code[20], definition of used import configuration</param>
     /// <returns>Return value of type Record "CSV Buffer" temporary, contains all lines from imported file.</returns>
     procedure ImportFile(ImportConfigurationCode: Code[20]) TempCSVBuffer: Record "CSV Buffer" temporary;

     /// <summary>
     /// Specifies whether field separator is supported for the format
     /// </summary>
     /// <returns>Return value of type Boolean.</returns>
     procedure FieldSeparatorSupported(): Boolean;

We will also create an enum that defines our supported file types. For now, we will add support for Excel (xlsx) and CSV files. The important thing is to define enum using the keyword “implements” followed by the name of our interface. This construction specifies that all enum values have to implement this interface (it does not matter whether the value is included in the Enum definition or is added through EnumExtension).

 /// <summary>
 /// Enum TKA Import File Format (ID 50000) implements Interface TKA IImport File Format.
 /// </summary>
 enum 50000 "TKA Import File Format" implements "TKA IImport File Format"
     Extensible = true;

     value(5; "Excel file (.xlsx)")
         Caption = 'Excel file (.xlsx)';
         Implementation = "TKA IImport File Format" = "TKA Import File Format XLSX";
     value(10; "CSV file (.csv)")
         Caption = 'CSV file (.csv)';
         Implementation = "TKA IImport File Format" = "TKA Import File Format CSV";

Interface Implementations

Interfaces can be implemented using Codeunits with the “implements” keyword (similarly to enums).

CSV Files (Code on GitHub)

There is nothing special about the implementation of CSV file imports. The import is done using “CSV Buffer” functionality (that manage everything internally) and, as the ImportFile procedure must return CSV Buffer, we just can return the loaded records.

The procedure FieldSeparatorSupported returns true as CSV files needs separator character to split the values.

Excel Files (Code on GitHub)

The implementation of Excel files is very similar. It is done using Excel buffer (as was discussed in this article). The only difference from CSV file implementation is that we need to change the structure of loaded values from “Excel Buffer” to “CSV Buffer”.

FieldSeparatorSupported returns false as Excel does not use separator characters.

Finally, let’s import file

Once we have defined and implemented all supported file types, we can use our functionality just by calling the ImportFile procedure through an interface defined with the enum value.

For our example, I created a table that defined file configuration (file type and field separator, if necessary), available on GitHub. Using values in this table, we know which file type we are importing and which field separator we are using.

 /// <summary>
 /// Import lines using import configuration form current Record (Rec)
 /// </summary>
 /// <returns>Return value of type Record "CSV Buffer" temporary, contains all lines from imported file.</returns>
 procedure ImportFile(): Record "CSV Buffer" temporary
     IImportFileFormat: Interface "TKA IImport File Format";
     IImportFileFormat := "TKA Import File Format";
     exit(IImportFileFormat.ImportFile(Rec."TKA Code"));

Business Central Bootcamp – AL Language: Coding for performance session

The Business Central Bootcamp conference is almost here! Let’s check all sessions and find your favourite ones at You can register for the event using this registering form for FREE!

The mine one will definitely be interesting – do you know about performance patterns in AL Language? And do you know how to use Partial Records? After this session, you will be able to use both of them properly in your own projects.

Business Central Bootcamp, 16th – 17th April 2021
AL Language: Coding for Performace
Presenter: Ing. Tomas Kapitan;
10:00 – 11:00 am GMT/UTC
EDIT: New time of session: 11:00 am – 12:00 pm GMT/UTC (01:00 – 02:00 pm CET)