Reading time: 5 minutes

This is the second part of a two-part blog series on technical code changes in Microsoft Dynamics 365 Business Central 2021 release wave 1. In Part 1 of the blog series, the pending and removed ObsoleteState warnings were covered. In this part, I will cover:

If you haven’t read Part 1 yet, check it out now! You can also register for the upcoming webinar on this topic here.

Newly introduced technological advancements in Microsoft Dynamics 365 Business Central

Dynamics 365 Business Central continues to evolve and become more technologically advanced. Following this pattern, in this release, Microsoft introduced improvements such as:

  • Report Extensions. They might be used on the future localization and ISV solution apps. This improvement was made in response to requests from the Microsoft Partner community.
  • New AL Objects: Entitlement, PermissionSet and PermissionSetExtension. They will enable user rights management for different objects and sensitive data.
  • Interfaces can now have the obsolete state. This will enable the removal marking of Interface objects which will be deleted in the future.
  • Complex types in code can be used, for example DoSomethingWithSales(GetCustomerByName('spo').GetSalesLCY()). For more information, read this: https://github.com/Microsoft/BCTech/tree/master/samples/ReturnOfTheComplexType
  • Update in the Lookup Triggers. When the user selects an entry in the Lookup Trigger, it will be possible to retrieve the record link of the chosen entry in AL coding language, instead of just the name.

Microsoft Dynamics 365 Business Central enum object count and remaining option fields

In the Dynamics 365 Business Central 2021 release wave 1, the remaining not extendable Option fields and variables are decreasing. In this release, there are 92 fewer Option fields than in Dynamics 365 Business Central 2020 release wave 2.

Microsoft continues to increase the Enum object count to replace all Options - making applications more extendable. Microsoft added 56 Enum objects in this release, increasing the total Enum object count to 287.

Microsoft Dynamics 365 Business Central interface object count and pricing functionality

The ‘Price’, ‘Cost’ and ‘Discount’ functionalities are still in the development stage and haven’t been released yet. Because the 5 new Interfaces that were created in Dynamics 365 Business Central 2020 release wave 1 relate to this functionality, this could be the reason why there were no new Interfaces created in this release of Dynamics 365 Business Central.

Making the code more extendible in the latest release of Microsoft Dynamics 365 Business Central

When comparing the Microsoft Standard Applications code of Dynamics 365 Business Central 2020 release wave 2 with Dynamics 365 Business Central 2021 release wave 1, we discovered that quite a bit of code has been moved to separated procedures containing Standard Handled Publishers. This means that the code becomes more extendible and enables fewer modifications in the standard.

For example, around 1000-2000 lines were changed in Sales Post, Purchase Post, Item Jnl. Post Line Codeunits, Purchase Line, and Sales Header Tables. This was done because many functionalities were placed in separate procedures and a lot more Standard Event Publishers were added into the code and into all the new procedures. The fact that 1000-2000 lines were changed may seem a lot, but the code logic hasn’t been changed, it was simply enhanced and re-organized to make it more extendible.

Overall, the number of Standard Event Publishers that help to easily move customizations to Events without the need for costly reimplementation work when upgrading is increasing in Dynamics 365 Business Central. In the previous two releases, Microsoft added over 1000 Standard Event Publishers. In Dynamics 365 Business Central 2021 release wave 1, Microsoft is very consistent and has created 1792 more Standard Event Publishers in comparison to the previous release.

The other code changes in Microsoft Dynamics 365 Business Central 2020 release wave 2

In addition to those noted above, I am also tracking the code changes that may not have significant importance now, but could become more important in the future as Dynamics 365 Business Central continues to evolve:

  • Changed objects. Microsoft continues to change many objects between major releases. In this release, there are 2784 changed objects. 
  • Redesigned Power BI Framework Codeunits. It is not very frequently modified by Dynamics Partners, but Microsoft’s redesign has resulted in a lot of obsolete procedures.
  • The ‘ItemTrackingLines’ page was heavily updated (966 lines were changed) with the CodeCop warning fixes and added Standard Event Publishers. This may seem like a lot, but code logic hasn’t changed.
  • AL-unfriendly code still remains in Dynamics 365 Business Central, but part of it was fixed, mostly adding brackets near functions and Next() internal functions.
  • Around 50 000 CodeCop warnings and Informations are still visible in this release.
  • There are 6 newly added folders and more objects grouped within them.

2021 wave1 release - figure 1

Figure 1. Screenshot of the 6 additional folders in Microsoft Dynamics 365 Business Central 2021 release Wave 1 (version 18).


The overall changed code count in Microsoft Dynamics 365 Business Central 2021 release wave 1

When comparing the four latest Microsoft Dynamics 365 Business Central versions, we counted the following code changes:

 

The tracking of the changed parameters

BC 15

BC 16

BC 17

BC 18

Changed objects

-

3329

2195

2784

Folders (grouped by functional areas)

5

21

27

33

Enum objects

1

129

231

287

Remaining Option fields

2308

1955

1713

1621

Interface objects

-

5

5

5

Pending ObsoleteState objects

24

95

206

500

Removed ObsoleteState objects

26

27

27

118

Pending ObsoleteState procedures

38

317

624

788

Removed ObsoleteState procedures

-

3

14

35

Standard Event Publishers

7651

8028

9746

11538

 

If you are considering an upgrade to Microsoft Dynamics 365 Business Central 2021 release wave 1 and would like to know how much it will cost, check out 1ClickFactory’s Upgrade Analyzer  - it’s FREE!

For more information you can watch my Business Central 2021 Release Wave 1 webinar.