Category Archives: Dynamics NAV

Directions EMEA 2019 Afterthoughts

It seems that when my blog posts appear some people hold their breath. Don’t worry, that won’t be nessesairy this time.

I am at the Vienna airport and just wanted to write some thoughts I have after the event.

When I look at 2.500 people wondering around I don’t see a community. I see individuals. We call it a community because we share the love of a product but we need to move to the next level of community.

Business Central Wave II is the first version of Navision without C/Side and a windows client after it was introduced in 1995. For almost 25 years C/Side made our carreers.

A lot has happened in 25 years and most solutions grew out to be monolyths. Not because you cannot write clean decoupled code in C/Side but because we lack knowledge and discipline.

Now with Extensions and AppSource we have a chance to start over, to do it in a better way. But it does not look like we are doing that.

Why did the concept of extensions see the light of day? Because it allows Microsoft a platform that allows Business Central to connect to AppSource. AppSource allows everyone in the world to find your solution without you doing much marketing effort.

This means we now have a platform to share repeatable small modules. But this is not what is happening.

Partners that did everything themselves in C/Side that led to solutions with thousands of objects that nobody understands anymore are still looking to convert these solutions to AL rather than looking at that is out there and reuse existing apps.

I’ve even heard that partners are now merging AL code because they modify the base app.

THIS IS HORRIBLE!

Giving up C/Side is only worth doing if we get back the repeatability of small reusable components with clear interfaces.

WE NEED TO BE A COMMUNITY THAT SHARES!

Start sharing IP! Don’t re-invent the wheel because you had to do this in C/Side. In Business Central having 10 ISV solutions in one database is a piece of cake.

This is my biggest takeaway.

The second thing that was interesting for me was having a conversation with Microsoft. I cannot remember having conversations like I did in the past few days with them in years.

We talked about the refactoring and challenges in the future. We agree that breaking changes should never happen again and still we need to continue breaking up the base app into smaller pieces.

For this to happen and to avoid future frustration they’ve invited me back to visit Lyngby every now and then in an informal role. I’ve agreed to try that and let’s see what will happen here.

I’ve also pushed Microsoft to have better involvement of MVP’s in the next interations. This group of people can give good feedback and seem to have been forgotten in the last 6 to 12 months.

The future is uncertain and a lot of decisions need to be made. The road is not paved, The road in many cases has to be created using heavy machinery.

Yet Business Central remains the BEST flexible cloud ERP product. The webclient team did a great job making this client on-par with the Windows client in the best way possible. Web development is so much more difficult than the old Win32 UI.

See you at NAVTechDays? Find me at the ForNAV or Global Mediator booth.

Tip #62 | “Where-Used” in Visual Studio Code

The “Where-Used” in Visual Studio Code is nice, but not always productive. Today I wanted to see where a field was used and came up with an alternative I wanted to share.

ObsoleteState

If you mark a field ObsoleteState::Pending the compile will throw warnings everywhere the field is used. This allows you to quickly use the error window to jump through the code and check whatever you want to check.

When finished you set the obsolete state back.

What if…

Sometimes I can be a bit emotional when it comes to changes in the software product I work with on a daily bases. An example of that was my previous blog that I took offline in order to do some editing making it less about emotion and more about facts.

The emotion is probably justified for a few reasons of which most the fact that Navision, NAV, Business Central (I stopped caring about the name) provides a living for me and my family but it’s more than that.

Around our product there is a community that stands out from almost any other community I’ve seen. We have a large number of events that are not organised by Microsoft but by partners, customers or in one case even by one single guy. Not because they make money doing it, but because they think it’s nessesairy.

What I’ve seen is that even if the product changes and evolves in complexity the people around it don’t stop loving it. Sometimes Microsoft makes a decision around the product that could have been done differently but then we always have the community steering them back. It has happend so many times that I lost count.

When I read the comments to my blog it looks as if a majority agrees that working in C/Side is faster than working in Visual Studio Code and we lost a great deal of simplicity. I know that there are also many who disagree with this statement.

One community that I’ve experienced to be even more passionate about their product is the Great Plains community. When I statet that in my opinion Business Central is replacing the GP product I did not got love and hugs.

The fact is though that I’m a bit jealous of the Great Plains people and sometimes I wished that instead of NAV, GP was the platform of choice to move to the cloud.

Why, you might think. Wel, because Microsoft is still maintaining GP, adding new features and keeping it compatible with modern versions of Windows. But the software is not overhauled like NAV.

Imagine that for the next decade or more we could work wiith C/Side and sell new licenses. Including to be able to use the windows client. Many would love that,

The fact that Business Central is based on NAV makes it easy for me to join the new community but it has cost us a great level of productivity,

It’s going to be very interesting to see what Microsoft will do after Wave II. I cannot wait to go to Vienna and see the roadmap.

Personally I think we can all use some slowing down after all the changes in the last few years. If the Microsoft slide for Wave III said “stabilise the product” I would stand up and cheer.

From a business value perspective integration scenario’s are the most important area for the future. Where Visual Studio Code and AL get all the attention I would spend my time learning the API and if I had a vertical solution I would redevelop it on another platform than AL.

The future of Business Central is international. BC is the only flexible SMB solution with localizations and translations all over the globe.

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 back, but let’s look forward, let’s see how it is posible to prevent programmers who take a dependency 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?

Things that are 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.

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 intact.

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 realistic 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. Don’t just take things for granted – ask questions, be critical, be very critical, and come up with constructive examples and ideas where things need to be improved

Just my 0.02$.

Working with Azure Blob and NAV

UPDATE 2: The code is (finally) published here. https://github.com/markbrummel/azure-blob-storage-public

UPDATE!! The code will be published. Please allow me a period to do so. Making the code available will be part of the next itteration of the ForNAV report pack module.

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.