NAV on Docker in 2022

One of my clients asked me if I would be able to help them with an ‘upgrade’ of an add-on for Dynamics NAV for one of their customers. For this task I would have to get a working C/SIDE in a number of versions. It’s been years since I’ve done any C/AL development, and I thought this would be a cool task to work on. This post describes what I found is what does and does not work if you want to do this using Docker containers.

Background

Just to paint a picture… First of all, the end user is on NAV2017. They had an older version of this add-on, which was developed on NAV2013. The task at hand was to implement a newer version of the add-on, which was developed in NAV2018. Technically, this was a downgrade of the add-on objects so I had to be careful to avoid any incompatible object attributes. I won’t bore you with the details of the actual ‘upgrade’, nobody wants to read about those.

The Environments

To be able to identify the mods of the original add-on, I needed a C/SIDE environment for NAV2013R2. Since this version is not available in containers, I had to actually install this version.

The end user is on NAV2017, and the ‘new’ version of the add-on is in NAV2018. Both of these versions are available in containers, and supposedly all you need to do is put together the correct artifact URL. You can find this information on Freddy’s blog. Mind you though, the localization for the US is called ‘na’ in NAV, not ‘us’ like in BC.

How about Docker?

what does and does not work? This, to me, is a pragmatic problem. I spent quite some time trying to make NAV2017 and 2018 work in containers, because I have used them successfully in the past. I have a terrible memory though, so I always start from scratch, and what I could find was outdated. At some point I just started the NAV2017 DVD download as I was researching a problem. The d/l completed before I found the answer so I abandoned the container idea for NAV2017 and just installed it. I have plenty of VMs available to do this so one way or another, I’ll get a working instance.

After going through a bunch of troubleshooting and following obsolete download links, I was able to make the NAV 2018 container work. Freddy wrote about troubleshooting here, but not all links still work. You have to enable .NET framework 3.5 and 4 in the Windows features, you need Visual C++ redistributable for Visual Studio 2015 (“The program can’t start because MSVCP120.dll is missing”), and you have to get working SQL bits (weird – the Windows client did work but C/SIDE did not until I installed those). What made the ODBC errors go away for me is the SQL Server 2012 Native Client. The SQL link in Freddy’s blog did not work for me.

I could not get NAV2017 to work at all, it would not even start. As I said I got the DVD to download before figuring out the problem and I installed it from there. It’s not like I have NAV2017 clients lining up, so I did not want to spend a second more than I had to on this.

Lesson Learned

So in the end I ended up installing NAV2013R2 and NAV2017, and was able to get a NAV2018 container up and running. The lesson learned though? I bet it is still possible to get the NAV2017 container to run right, but just as a safety I have downloaded all versions of the DVD going back to NAV 5.0. To Microsoft’s credit, they still have most of those as downloads, but you never know when they will remove them.

This post is mostly for my own benefit, but I wanted to share it if anyone out there also needs these. Let me know in the comments how you’ve made NAV and C/SIDE work in containers.

NAS on the Service Tier

If you have made heavy investments in automated solutions that run in NAS you can breathe easy, because chances are that it still works in NAV 2013!!

When Microsoft first came out with the news that the Classic Client was history, and that a number of object types were going to be discontinued, there was a LOT of speculation in the NAV world. Most of this speculation was based on unverified rumors, baseless “common sense” applied to unverified assumptions. One of these assumptions was “the Classic Client will be gone, so therefore NAS will be gone too”. Technically, these people were right of course. With a few minor restrictions (no forms, no dataports, no user input, no dialog boxes), NAS was nothing but a Classic Client without a user interface that runs as a Windows Service. Because the Classic Client no longer exists, NAS as we knew it is indeed gone.

What many of these people don’t realize is that the NAV team actually cares a great deal about making the life of the NAV partner channel easier. Everyone that knows about NAS knows how many products are built around it, even standard NAV functionality is implemented through the use of NAS (Job Queue, ADCS, to name a couple). It was in everyone’s interest to have a good alternative for NAS, and I believe the result is a very solid way to provide the ability to automate just about any user task in NAV. Coupled with the ability to create NAV sessions programatically, I believe that there are even more possibilities.

One aspect of your existing NAS implementation may cause some difficulties, and that is the fact that COM is no longer supported in NAV 2013. For instance, the “CP Timer” no longer works, the “Bus Adapters” no longer exist, and many other automation components will no longer work. For every use of COM you will need to find an alternative, whether this is .NET interoperability or whether you will need to find an alternative component. If you have existing NAS solutions, and you are thinking about upgrading to NAV 2013, please get in touch with your partner and start investigating what needs to happen (if anything) to keep your NAS solution running.

For a long time I’ve known about NAS on the Service Tier, and I’ve been looking forward to the time that I would finally be able to share this information. So sit back and relax, grab a cup of coffee and start the video. I’ll explain how to set up an instance of the Service Tier for NAS Services, and I’ll show you a number of ways that you can implement NAS on the Service Tier.

First published August 8, 2012

NAV2013 Beta – OData Introduction

With NAV 2013, Microsoft has added the capability to expose data from your NAV system as OData Web Services. Where that differs from regular Web Services (which in the NAV Server management snap-in is now identified as ‘SOAP Services’), is that OData only exposes data feeds, and within the context of Dynamics NAV is read-only. Click here to read all about OData, and here for an overview of OData in NAV 2013.

I’ve put together a new YouTube clip to show you where to find the OData Web Services in the NAV Server Management tool and the Web Wervices table from the RTC, as well as a couple of examples of how to consume them. As you will find out fairly quickly in this video, I have a LOT to learn about OData. I wanted to share what I do know though, and give you an idea of where to start looking.

This provides a new way to expose data from NAV, in an industry standard way, although I am sure that true OData experts will find missing pieces. It is another possibility for us to expand the reach of the ERP application that we know and love. I hope you enjoy the video, and that you will be inspired to start learning about it, and maybe even get some ideas about how to use them for your business.

First published May 23, 2012

New and Improved Page Design in NAV 2013

In NAV 2013, Microsoft has introduced some very nice new features to make designing Page objects for the RTC much easier than we were used to in NAV 2009.

Remember the good old days, when we had a wysiwyg designer for the Form objects, and we could put anything we want, anywhere on the form? This made for some really ‘creative’ (ahem) solutions, but essentially we were used to having complete control over the look and feel of the forms. When the RTC was introduced, we got the first step into a completely independent display target. Instead of defining x and y positions, display elements are now defined by metadata, and the display target should then be smart enough to interpret the metadata when the object is rendered. The intention was to ultimately have a situation in which it doesn’t matter where the page is displayed. The page object itself can be identical, and the display target then decides how to display certain elements based on the capabilities of the display target. For instance, the RTC displays exactly the same page as the Web Client or the Sharepoint Client, they just display the same page differently.

Unfortunately, when all you see is metadata, developing Pages becomes a very abstract exercise. Since there is no direct connection between the development tool and the rendered object, what we had to do was save the object, and hope for the best from there. We had to actually run the page to see what it would look like, and finding individual elements was a very painful thing to do. Lucky for us, the NAV team in Denmark cares a great deal (a GREAT deal) about what we think of the product, and they are VERY proud of the tools. When they were receiving many complaints about the Page Designer, they decided to enhance the development experience in NAV 2013 and address some of the most-frequently-complained-about issues. In my opinion the result is a HUGE improvement over NAV 2009.

What I want to do is focus on two new capabilities in the Page Designer. The first one is the ability to preview the Page right from the Page Designer, without saving the object first. My favorite feature of this capability is that there is a link between the ‘metadata designer’ and the ‘page previewer’. When you click on an element in the ‘metadata designer’, it is highlighted in the preview, and vice versa. You can see a rendered version of the metadata before saving it, and have a visual clue of what you are doing. The second (there is an ‘A’ and a ‘B’ here) is the ability to add columns to the Page object, through a Grid Layout and/or a Fixed Layout. These two new types of group elements make it possible to display multiple columns on the Page.

The NAV 2013 online help has a lot of good information about Page design, with walkthroughs and other tutorials. I’ve created a YouTube video in which I take you through the various screen elements of the NAV 2013 RTC, and then into the Page Designer to show you these new capabilities. I hope you’ll enjoy the video, and hopefully you’ll feel a bit more confident in using the Page Designer.

First published May 31, 2012

Debugging NAV 2013 is Easy

We’ve never had a debugger quite this powerful and versatile. Debugging NAV 2013 is Easy!

By nature I am a pessimist. In any situation I tend to look for problems and point them out to everyone. Since my goal of pointing out the problems is always to SOLVE them, and leave the situation in a better state than I found it, I personally consider my natural pessimism a very positive attribute. One of the things that feeds this pessimism is previous, similar situations. One example of such a situation is the release of a new version of NAV. When this happens, the NAV developers are always hoping that the tools have improved, and for well over a decade, one especially sore point has been the debugger.

When I first started as a Navision developer, version 2.5 had just come out, and most of the customers I worked on were still on earlier versions. The debugger in those days was TERRIBLE. Even then, coming out of a job as a VBA developer, I knew that there were much better alternatives, and I was always surprised just how bad the debugging experience in Navision was. Granted, there have been significant improvements since the 2.5 days, but the worst day in NAV development history surely must have been when NAV 2009 came out, and the only way to “debug” the RTC was the workaround with the Visual Studio debugger (see this video on how to make that work). Given all of these previous experiences, let’s just say that I was realistically pessimistic for the NAV 2013 debugger, and my expectation was actually a continuation of this downward trend ;).

As I’ve said many times before, the NAV team actually cares a great deal about the development experience, and for years they had been wanting to address the development tools. They were well aware of the problems, but the priority to do anything about it was always too low to make it into a new release. With the discontinuation of all the Classic components, however, this changed and there finally was ample priority for a new debugger. The results of years of very hard work are very impressive, and in my opinion the NAV team has delivered something that is well beyond anyone’s reasonable expectations. The new debugger is a great tool, one that gives the NAV developer a lot of flexibility. Not only can we break into any type of session on any Service Tier (given the proper setup), we can even change the appearance of the debugger, and customize it to our own personal preferences.

This is another one of those things that I’ve been very anxious to share, and I am very happy that I finally had some time to put together a YouTube video and write this blog entry. Please enjoy the debugger, and I hope you are as happy with it as I am.

First published August 14, 2012

Installing NAV 2013 Beta

Finally, NDA has been lifted, and I can FINALLY start sharing what I know about the new version of the product that we all know and love. Well most of us actually DON’T know it, which is why I love sharing this with you :). I’ve been very fortunate to have the opportunity to attend some TAP events in Copenhagen, and get access to early CTP versions of the new version of Dynamics NAV. As I was attending these events, I was getting VERY excited about the new technologies. The reason is that the NAV team has worked incredibly hard to address all of the painpoints that we feel in the current version of the product.

Not only that, they have also completed development for the new Sharepoint client, which provides almost all of the standard functionality to Sharepoint. Not only that, they have also completed development for the new Web Client, in which almost all standard NAV functionality is now available through a regular web browser. Not only that, NAV is the first Microsoft ERP system that can be deployed in the cloud on Windows Azure and SQL Azure. Not only that, we now also have a way to expose regular SOAP webservices as well as OData webservices. Not only that, we now have a host of new technological capabilities, such as a solid RTC debugger that we can actually modify ourselves, such as a new Query object that will allow us to define SQL queries as an NAV object type. Not to mention the new testability feature, which gives us the ability to completely automate testing. Not to mention a completely redeveloped data stack. I could go on, but hopefully you are getting my point :). It’s been a long time coming, but personally I think it is absolutely worth the wait. I am absolutely convinced that NAV 2013 has taken a HUGE step forward in maturity for our product, and I think it will provide a LOT of benefits for existing customers as well as new customers.

My plan is to create many YouTube clips to show you as many features as I can, and the first one is where I recorded the installion of the NAV 2013 Beta version into a Virtual Machine. In this video I talk about some of the prerequisites, the various components of a regular RTC installation, and I show you some of the features. It covers the RTC, the development environment, and I quickly go into the server management console. Enjoy and please leave your feedback in a comment.

First published May 17, 2012

Performance on NAV 2013

The first performance impressions are in and it looks like NAV 2013 is the first version on SQL Server that is going to outperform the native database server.

When talking about whether to upgrade to NAV 2013, one of the things that my customers are interested in most is whether it will perform at acceptable levels. I’ve been wanting to do something elaborate and use the new testability capabilities in NAV 2013 to do a benchmark test for performance specifically. As often happens, plans don’t always come together, and by the time I started forming some ideas, other people have gone and done a much better job than I could have. So, what I thought I’d do is compile a number of links to performance related content that I’ve found so far.

First off, my fellow MVP Jörg Stryk wrote a very technical article about his impressions of NAV 2013 from a SQL Server point of view. He shares his sources, he’s done some comparisons between his own T-SQL and the queries that are generated by NAV 2013. Very interesting to read his train of thought, and, if you can keep up with him, you will learn a thing or two about SQL Server. Some of the key things that I picked up on are the modified locking mechanism, the promise of the query object, and the annoying fact that individual users cannot be identified from the SQL Profiler anymore.

Next, my coworker Faithie writes about some changes that were made to how Dimensions are handled in NAV 2013. This one has a huge potential to help improve performance. I work with customers that have millions of ledger entries, with hundreds of millions of ledger entry dimensions, and the prospect of eliminating pretty much all of those is a very compelling one.

Next up, another fellow MVP, Vjekoslav Babić, who lists his top 5 SQL Server improvements. With NAV 2013 being the first version on SQL Server only, we can finally start letting go of certain “SQL improvements” from previous versions, which were really just things to make NAV on SQL behave the same way as the native database server. If I were to list what I take away from this article, I would list all 5, so I’ll spare you and just refer you to the article itself.

Where it gets interesting is when mergetool.com‘s Per Mogensen puts together a couple of videos (here and here) to demonstrate how NAV 2013 stacks up against NAV 2009. These videos then inspired Vjeko to take it a couple of steps further, and put together his own test, and he even shares his test objects. This is turning into a real community effort!

With NAV 2013, it looks at though the potential is definitely there to get performance up to native database server expectations, which was always the argument against using SQL Server. What I am very much excited about is that finally the NAV team can let go of artificially making NAV on SQL Server behave the same way as the native database server and let SQL Server do what it is good at. I personally think that they have only just scratched the surface, and a ton of further improvements are possible. I think the query object will prove one of the most potent weapons against performance problems, and, hopefully, we’ll see a tighter integration of SQL Server capabilities from C/SIDE.

First published June 25, 2012

Adding a Service Tier for NAV 2013

With the new Server Administration Tool for NAV 2013, adding a Service Tier is ridiculously easy.

In the good old Navision days, setting up multiple databases was a piece of cake. Every developer, tech support person, consultant, CFO, or resident ‘computer guy’ with just a little bit of technical skills wouldn’t break a sweat to create a new database for testing purposes, for training, or development. When NAV 2009 came out, things became a heck of a lot more difficult as the new RTC setup required you to also set up a Service Tier. Although there is a large number of blogs, forum posts and other online content available to help and guide you through this process, it remained painfully difficult and complex. In a 75 step process you better not skip crucial step number 32, which you didn’t realize until after irreversible step 58, and you had to uninstall everything, wipe clean the server, and start all the way from scratch. I don’t think it will be a surprise to hear that only the truly geeky NAV professionals enjoyed installing the service tier, and the complaints were always very loud when I listened to people at events like Convergence.

Lucky for us, the NAV team at Microsoft cares a great deal about the users, and it was very important for them to provide a set of tools that is easy to use, not just for technical people but also for admin type people. At the heart of it all is a set of PowerShell commands. These commands can be used separately in a PowerShell Session, and they can be scripted for unattended installation and scheduled maintenance purposes. For people that do not like to write “code-like” commands, there is also a new Windows Management Console snap-in for managing Server Instances. To start the Management Console, click on Start, Run, enter “MMC” and click OK. The NAV Server Management Tool can be added there.

The online help has a lot of information about the Server Administration Tool, which can be found by clicking this link.

When I needed to set up a worldwide NAV 2013 database, I decided to add this under a new Service Tier instance in my existing VM (in which I had a US database already installed), and record my progress to share with you. This video was not scripted ahead of time, I just recorded myself as I went along. It did go wrong along the way, and I had to do some troubleshooting to make it work right. See if you can find the mistake that I did not catch until after I was done editing wink. I hope that you will enjoy this video, and maybe even gather enough courage to try setting up multiple instances of the Service Tier.

First published June 4, 2012