Category Archives: Dynamics NAV

How Do I – Prevent an epic clusterfuck…

Now that the NDA on Business Central Wave II has been lifted and the DVD preview is released partners got time to look at the code Microsoft has refactored.

The reactions vary from being marketing correct to more realistic.

I have a strong opinion about what Microsoft did, and especially how they did it.

First of all, I agree that it’s a great idea to split NAV up into modules and I also agree that the architecture has to be modernised in more than one way.

But that does not mean it has to be with breaking changes and most of all, it did not have to happen in Visual Studio Code with Extensions.

Microsoft is years, maybe a decade too late with starting this project. To write decoupled code you don’t need extensions and you don’t need a fancy code editor. You need discipline and consistency. Especially the latter seems to be where Microsoft is totally off these days moving away from patterns in a horrible way. (But that’s a different blog.)

As I suggested in many presentations Microsoft should have added Table Extensions and Page Extensions to C/Side. They should have also added a column to the Object table called “module”. The compile should have been enhanced checking if modules would compile on their own.

With these simple changes modularity would have been possible a long time ago and the ecosystem would have been used to it.

Let’s not look the cow in it’s behind, let’s see how you can prevent your partners from being forced to refactor their code.

The problem Microsoft has now managed to place themselves into is that extensions on AppSource cannot be compatible with both Wave I and Wave II. This means tenants cannot be upgraded until partners are ready with the refactoring, which is a lot of work.

It get’s more difficult with per-tenant extensions. To upgrade the code a partner has to compile against Docker or the installed DVD, but how does the customer test against their own data?

Does the customer get to upgrade a sandbox? And if yes, how many times?

To me this just shows that people at Microsoft are too far away from reality and living in a dreamworld.

It can be done different and Microsoft actually implemented what I am going to suggest after being pushed a bit.

In the current preview the TempBlob table has it’s old functions. So does the Language table. Both are moved from BaseApp to System. The functions are marked to be removed in the future. New functions are somewhere else.

In earlier previews these functions were not there as you can see in the GitHub reposititories that are public for everyone to see. By putting the functions back under a bit of partner pressure Microsoft prevented a lot of drama.

Things that are still broken are primarily renamed codeunits and functions that changed signature.

A simple example is the function to read the contents of a zipfile that changed from a temptable to a list of text.

To prevent breaking this Microsoft’s AL team introduced overloading. This allows to create a new and improved version while keeping the old one and mark it to be obsolete in the future.

The same can be done with new codeunits. Just leave the old ones there. Point them to the new code if you want to.

BUT MAKE SURE EXTENSIONS CAN EASILY COMPILE AGAINST AT LEAST TO AJACENT VERSIONS!!!!!

This way of moving API releated code has been normal in all frameworks for decades. Why can a huge company like Microsoft no do this with Business Central? I just cannot get my head around it.

I know it’s cool to be an MVP. I’ve been an MVP for 11 years, traveled the world and it gave me opportunities I could have never dreamed about. That does not mean you cannot have your own opinion and it does not mean you always have to agree with what Microsoft does.

I also understand how insanely difficult it must be for the Business Central team to survive within the large Microsoft organisation working with a small budget. There is currently no leadership to steer the ship and this may cause the situation today.

It’s going to be interesting to see what happens in the future. I am in favor of continuing to break the functional app into pieces with contracts. I will explain how I would try to do this.

My favorite example is Fixed Assets. Did you ever try and see what happens if you remove the 56xx objects from C/Side?

Large parts of the application will no longer compile. Codeunits like 12, 80, 90 and tables like 37, 39 and 81.

To prevent this you’ld have to implement event publishers and introduce enumerations. This will allow to move code that has dependencies to it’s own module.

This needs to be done without changing any of the functionality and then taken into production. Only after a succesful launch without changing the functionality one can consider changes.

But, the changes should then be done to a new app while leaving the old one in tact.

This is probably not something you would want to do with Fixed Assets, but with Production, Warehouse Management or Inventory it makes more sense. Especially Warehousing is in a horrible state because it’s hard to extend. It was never designed for extensibility.

It does not have to be when the old module can be replaced with a new module.

Maybe I am just dreaming or over simplifying things but I think it’s reaslistic to say that with the introduction of the system app Microsoft could have been more careful, take more patience and allow a more phased approach.

After all we are talking about a business solution that is critical to the companies using it. Microsoft made a strong promise about upgradability that can and should be kept.

Partners have the responsibility to be more critical to their software vendor. In my opinion a lot of unnessesairy shit is taken for granted just because a logo with 4 squares has been stamped on it.

Just my 0.02$.

Advertisements

Working with Azure Blob and NAV

This is something that’s long overdue, I wanted to write this before my summer vacation.

My reason for holding back is that I want to share all the code for this project and this needs cleaning up. This is still not done and if you want the code you’ll have to contact me.

Why am I still writing this? I am actually writhing this from the “International” airport of Cork Ireland where I spent the day with my friend Tim Grant.

Tim and I go way back when we both worked together on the Design Patterns project with Microsoft and the reason for my visit was to help him with his go-to cloud strategy.

Last spring we moved all EDI and E-Invoicing at my customer Vos Transport from On-Prem to Azure Blob Storage and Logic Apps.

In total we moved 4.5 million files to the cloud and migrated a few dozen EDI processes to use Azure Blob storage as queues.

The cost of storage and running this is less than 100 euro’s per month and it is insanely stable. So stable that I had to use Statical Prism today to find some of the code and explain it to Tim.

I’ll let this post sit here for a while and see what happens. if I get spammed to share the code I’ll spend the time cleaning it up. If nothing happens than no time is wasted.

Enjoy…

Episode 4 – BC Fall Release | Give Feedback

Feedback is critical for Microsoft to improve Business Central and all of their other products.

For this reason a preview is published of the upcomming release this fall. You can install this using Docker and I’ve been told a DVD will be made available soon.

This release will be the biggest change since the introduction of the Three Tier model and Role Tailored Client and fits into the row completing the move to SQL Server and Dos to Windows.

The move to AL is probably the smallest change here. AL has been running side-by-side with C/Side for a few releases and is proven stable.

More important are dropping the Windows Client and the refactoring of parts as described here. https://github.com/microsoft/ALAppExtensions

I strongly encourage every partner to reflect their solution against the preview.

Learn from the past

When Microsoft introduced Pages and the Role Tailored Concept the majority of the partners ignored the first wave and waited until they persieved it as more mature.

However, when the majority moved it was too late to give feedback as the base architecture was carved in stone and decisions were made that were irreversable.

Running multiple platforms side-by-side like in the days with SQL Server and Native, or Classic Client and RTC is too expensive and partners are using it as an excuse not to move forward.

Ask for help

Don’t reinvent the wheel. Help is available in a large quantity of resources. Getting started can be hard.

An example is the blog from Saurav who explains in clear steps how to get started with clear screenshots from the docker preview.

https://saurav-nav.blogspot.com/2019/08/how-to-setup-business-central-2019.html

The Penalty for sitting it out

Even though some may disagree, upgrading Navision has always been a very easy and straight forward process, especially if you did frequent small steps.

It was harder if you waited longer, but a direct upgrade from Navision Financials 2.01 to version 4.3 or 5.0 were no exceptions.

With the introduction of 2009 a mandatory in-between step was introduced that everyone has to go through which IMHO is the real reason upgrades got a bad reputation.

NAV2018 or Business Central Spring release are other examples of mandatory steps to go through before upgrading and moving to the cloud becomes harder the longer you want as will the price increase.

Dropping out

When the gap becomes too big the chance of dropping out increases and as a community we should do anything we can to prevent that.

Episode 3 – BC Fall Release | Finding Stuff

UPDATE!! Microsoft is listening!!

Big news, it seems that Microsoft is fixing the issues we’ve found in our App for AppSource. Both the functions on the TempBlob and the Language table will be added back!

But also, let’s continue where we left off with the previous episodes because there are more challenges that won’t be fixed. Let’s see if we can fix some reference problems.

Before we do that, please allow me to repeat that despite these breaking changes Business Central remains by far the best customizable ERP system in the cloud.

For this blog post I’m going to fix the errors in the ForNAV Modern Object Designer as Extention. Benefit is that you can do this yourself too. Just download it from http://www.fornav.com, convert it using the fornav converter against spring and than connect it to the Docker. (end of advertizing ForNAV)

Issue #1 – Renamed Codeunits

After connecting the extension to Fall we see that the codeunit NavExtensionInstallationMgt is missing.

However… this is not true, and very confusing.

Reason for this, is that Microsoft RENAMED a codeunit (they actually renamed a bunch). Now in the old days this was NOT DONE, even though in this case C/Side would have handled the rename for us because C/Side works at compile time with object ID’s. This is because C/Side was developed in the late ’80ies early ’90ies when memory was expensive.

Visual Studio Code works with object names. So how do we figure out the new name for this codeunit???

The obvious answer here would be to install the ForNAV Modern Object Explorer but hey, we are fixing this now right? So let’s go nerdy and hack into SQL and see what’s going on there.

In C/Side we can see that the Codeunit ID is 2500. But Fall does not ship C/Side.

Let’s see what we can find in the SQL Server database.

Accessing SQL on Docker

If you run Docker you can still access SQL via Management studio. An SA account is created with the same password as your NAV user. The SQL does not have an instance, so just connect to the IP address of the container.

The default name of the database is Financialsw1 which I think is funny and a remainder of our temporary product name. If you want you can also relate it back to Navision Financials.

First place to look would be the Object Table. So let’s run a query.

Select * from [Object]

No results, which makes sense because there is no more C/Side and all code is in an Extension.

SELECT [Object Name], * FROM [NAV App Object Metadata] where [Object ID] = 2500

So let’s see what we can find in the NAV App Object Metadata table

Here it is, and now it is called “Extension Installation Impl”. So let’s try that!

Issue #2 – Protection

So we’ve found the codeunit’s new name. Yeah! Let’s change it and see what happens.

One of the functions started working, but one did not, and the codeunit still does not compile.

The reason for this is the protection level of the codeunit, and a broken contract. But how do we investigate that?

If you try Go To Definition on the object, you still get a “D/AL” file with no code, and it seems like Microsoft is not shipping the AL code in the App file on the Docker Container for the System app. Also we don’t know yet if it is in the system app.

Back to SQL Server

select * from [NAV App] where [Package ID] = '6418C5AF-4672-43DA-AD73-FF140FBBD537'

From the previous query we know that the App the object belongs to has ID 6418C5AF-4672-43DA-AD73-FF140FBBD537.

If we query that app in the NAV App table we can see it is system.

Now the next thing we need to do is clone the GitHub from https://github.com/microsoft/ALAppExtensions. This will get us the sourcecode, but Go To Definition does not work.

I’ll make it easy for you, the code is in https://github.com/microsoft/ALAppExtensions/tree/master/Modules/System/Extension%20Management/src

Codeunit 2500 has a property called Access which is set to Internal. Even if my extension is set to OnPrem I cannot access this function.

Step 3 – The Fix

In my case, the fix is easy. Just clone the code from CU 2500. It’s a fix I hate but IMHO unavoidable in this case.

Step 4 – Compile, Yes!!!

When you now run the MOD (Modern Object Designer) and filter on Object ID = 2500 you can see why I like this thing so much…

And then… No….

Now I should be able to export the object from the MOD but when I try I get this error?

And for a good reason, look at the variables!

Remember, we don’t have a Windows Client anymore? So we cannot run DotNet on client either.

For this I need more time to figure out a solution but I would also ask Microsoft to please enhance the compiler. I should not be able to compile and publish this extension against FALL release.

Episode 2 – BC-Fall Release Wave II | Checking Your Extension

Before we dive into the list of (breaking) changes that I’ve discovered so far, I will first explain how to check your extension against the preview of the fall release.

This is mostly interesting for those who are on AppSource or partners who have refactored their IP into On Prem extensions. I’m going to assume all of them have access to the Ready to Go program. If not, send me a message and I’ll help you onboard.

In another episode we’ll dive deeper into making your own Base App run on System.

So assuming you have a running service tier (on Docker or via de DVD on your machine) we need to make a few changes to the App.Json.

NOTE: You first need a new VSIX compiler. Download this from the Docker or DVD.

Plaform & Application

The Platform version needs to be changed to 15. The application needs to be removed. There is no more application.json file with symbols.

Now the dependencies need to be set. There are (most often) two apps needed here

BaseApp

Not really a “Marketing Friendly” name for the whole old Navision solution converted to AL code, but that’s it actually.

GUID =  437dbf0e-84ff-417a-965d-ed2bb9650972
Version =  "15.0.0.0"

Essentially you’ll get the same information as in previous versions with the app.json file generated by the finsql.exe but the .app file contains source code. I’ll get back to that in next episodes.

System Application

No consistency here. You would expect it to be called SystemApp, or BaseApp to be called Base Application. 😉

This is not to be confused with the platform .app file you’ll still get too. This still contains the 2 billion system objects that just are magically there (I think still maintained by finsql.exe when generating the database)

The new System Application is actually what you can find here on GitHub. But this seems not to contain source code. Again, more in a next episode.

Some examples of application parts that are moved to System Application are

  • TempBlob
  • Language
  • Tenant and Azure AD management
  • DotNET stuff
  • Etc.
GUID =  63ca2fa4-4f03-4f2b-a480-172fef340d3f
Version =  1.0.0.0

Your app.json file will now look something like this

Delete Old Symbols

It’s always a good idea to remove old symbol files before moving on. The compiler always looks at the latest version but here it might get confused because of all the moving parts.

Download new Symbols

Now just get the new symbols and your window will look something like this and starts showing you the warnings and errors.

Please note this is the result after some cleaning up. I’m not finished. I’ll write more about TempBlob and other refactoring challenges later.

See you in the next episode.

Episode I – BC-Fall Release Wave II | The Upgrade Dream Shattered

Be careful what you ask for, you might actually get it.

This phrase illustrates what we will see when Microsoft releases Business Central Wave II this October where C/Side is removed in favor of Visual Studio Code, The Windows Client discontinued in favor of the Web Interface and the old Navision application is broken into two parts and very heavy refactoring has taken place.

For years, we as a community have been asking Microsoft to modernise NAV in order to be more attractive to young developers and move to modern development methods.

Wave II is the result of a plan that started execution many years ago and the managers who executed the plan no longer work at Microsoft. This is scary and in a series of blog posts I’ll illustrate the challenges you can expect as a partner when you try to move your solutions to this new platform.

Today I’ve analysed the impact of the refactoring done my Microsoft on the AppSource solution I’ve developed for ForNAV. The Customizable Report Pack. After my analysis Michael Nielsen and I carefully concluded that Microsoft in our estimates has broken 99,9% of all solutions on AppSource and each and everyone will have to go through a certain level of refactoring.

In the next few blog posts I’ll explain some of our challenges based on what I’ve found in the new System App that is publically available on GitHub. Our challenges with the new Base App are limited, but even if they were huge I think this is still under NDA and in private preview. Need to be careful here. Hopefully the BaseApp will be publically available by the time my posts reach this part.

The Upgrade Dream Shattered

Let’s get back to the title of the blog. This was not just there as click bait and I will elaborate on that.

Upgrading Navision has always be a challenge. I don’t think anyone in the community disagrees to call that the Achilles’ heel of our framework so when Microsoft management used this as a reason to change we do development in NAV not a lot dared to think about complaining here.

In the same time a our community started to rant that NAV development was not modern enough and they demanded change.

F#$^@K

The idea was to make upgrading easier for both Developers/Partners and Customers. As long as partners would migrate their solutions to an extension life would be easy. If customers moved to BC-Cloud they would be upgraded automatically.

This has consequences that some might say are unexpected and others would clame “I told you so”.

From a partner perspective the first crack occured when Codeunit 1 was removed. Not a major change but enough to keep everyone busy and break most of the solutions out there. It made it especially hard on ISV’s that try to keep a codebase in synch with many NAV versions out there.

With this Fall release it becomes clear that there is no such thing as a free ride. For example this line of code will no longer compile:

CurrReport.LANGUAGE := Language.GetLanguageID("Language Code");

Which all of us will recognise as being present in 95% of all customers customized reports.

The first extensions on AppSource are already rated with 1 star by customers because they simply don’t work or are not easy enough to setup. For most partners the economic value of an extension is not high enough to justify the cost.

From a Customers perspective it’s also not all sunsine. Customers may have asked Microsoft for easier upgrades, but nobody ever anticipated that if you have a large company with for example multiple locations your IT department can never keep up explaining new features and changes to users. Many companies still struggle with (sometimes older) users who simply remember to click on the third button from the right and if that is suddenly the second button they can’t do their work.

I had this experience myself. I use Exact Online for my accounting. Not out of free will but because my accountant supports it and I have to pay extra to run other software. When I got back from vacation last week I quickly wanted to check my balances and the dashboard had been completely redesigned. A quick check that should have been seconds became 15 minutes and it was even full of weird errors.

On top of this hard to manage experience most Business Central customers I work with have customizations. Per-Tenant extensions. In some cases they have their own Invoice report with, yes, the line of code that will change the language.

These per-tenant extensions will break with Fall Update and the customers will be forced to pay the partner for the upgrade, where in the past they had the option to continue on the old code at least until off-season where they have time.

So all concluded I think it is fair to say the marketing people can stop claiming that the upgrade problem has been fixed. It’s not and in some ways it has gotten worse.

As said this is just the first post in a series. My head is totally full of ideas and stuff I want to share.

Keep Positive!

Business Central is still by far the best customizable ERP system. Some things are getting worse, some get better. I’m sure at some point in time someone somewhere in a corner office in Redmond will start realizing that effort needs to be put into the places where we are getting worse. I hope this series of blogs will help both partners and Microsoft move forward.

Opinion – What will happen in fall with Business Central

As far as I remember, social media around Business Central/NAV(ision) has never been as quiet as in the last months.

There is nothing from the MVP’s anymore and it seems the majority of partners are in the dark about that’s going on at Microsoft.

While this is true, Microsoft is updating the GitHub with the new AL foundation periodically with new code but without explaining the strategy. (https://github.com/microsoft/ALAppExtensions)

In fall, Microsoft will release the first Business Central without C/Side and refactored AL and because of that the shipping of daily insider builds has been blocked for a few months.

In the “old days” Microsoft would have code freeze before summer vacation and partners would get a build (DVD) which was very close to what Microsoft would ship at Directions.

Now there is nothing, except the GitHub without any guidelines on how to use it.

I’ve seen speculation that foundation will be dozens of small extensions, but I think this is a false rumour. My expectation is that each BC install will have three extensions.

Foundation

This is what you see on GitHub today. Most of which is stuff that should probably be part of the AL programming language such as TempBlob and Excel Buffer. Things NUGET offers for DotNET.

Application

This is what we have today as General Ledger, Inventory, Sales & Purchase, Jobs, Manufacturing etc.

This will be based on Foundation, but not broken up into smaller extensions even though that would be my preferred choice. Microsoft should have started that years ago and now they simply lack the time and skills. They fired most of the functional folks years ago in favor of a large platform and UI team.

This will lead to much rewrite of code, but not as much as most think.

After this I hope and expect that the design of the Application will be frozen since Microsoft cannot expect their partners to continuously refactor their code. We simply don’t have the resources to do that. Most partners don’t even have automated testing in place and refactoring is too expensive.

Large partners can write their own Application on top of Foundation allowing them to be on AppSource without Microsoft having to add half a million events for each business case.

Localizations

This is probably the coolest part if Microsoft can pull it off. Each localization will be an extension on top of Foundation and Application

Speculation & Opinion

I’m writing this in order to start a discussion and get some feedback what others expect. The information in this blog post is in no way confirmed by Microsoft.