NAV on Docker in a Local Virtual Machine

Do you want to have a local development environment for Dynamics NAV and Dynamics 365 Business Central, where it is easy to spin up and remove new databases, in whatever version you need? Docker makes it all possible, and this post explains how I was able to get my environment ready for prime time.

One of the most common things that happens in my blogging life is that I will be working on a post about a certain topic, and then as I come near a state where I feel like I can publish, someone else comes along and steals my thunder, and what often happens is that those other people write something much better than what I was working on. It’s demoralizing on one hand, but at the same time great to see so much quality content. Especially when a ton of it comes out on the same day, (as it did today), you ask yourself why am I even trying….

So, having just deleted the content of my attempt at some original Docker content, here are some of the most useful resources for this topic:

  • You can’t start this with anything other than a vast amount of material by Freddy Kristiansen, who has been working tirelessly on improving this area. He came out with a truckload of material today. You can just go to his blog and look for it yourself, but let me give you links to the most useful ones:
  • My journey to finally get Docker to work on my local Hyper-V virtual machine was biased, because I am fortunate enough to work with Arend-Jan Kauffmann. Back in December, he wrote an excellent blog about setting up networking into a local VM and to set up Docker access, where the container runs in the VM, and you can do development directly on the host machine. Thank you AJ for taking some time to look at my computer and helping me set this up.

I now have Docker containers run in multiple versions of Dynamics 365 and NAV, and it is all working seamlessly.

I’m still figuring out how to utilize Hyper-V most efficiently. For instance, I’m not sure yet if I should have multiple VM’s for multiple projects, or just keep it at a single VM with all of my projects. Especially when the version of the VSCode AL Language extension is important I might need to modify my setup. I will be experimenting with this and I’ll share that as I go along.

One thing’s for sure though: with my current working Docker container, this is about as efficient as I’ve ever been in my entire history as a developer.

Microsoft 365 Business Central

For about a year now, we have been talking about “Tenerife”. Despite going to great lengths to calm down the partner channel, the name and what it stood for has caused massive misunderstandings and great anxiety. Hopefully that anxiety will come to an end because today the new name has been announced: Microsoft Dynamics 365 Business Central (click here for the announcement and click here for the overview page). A catchy, easy-to-pronounce, 14 syllable name, and it is scheduled to be released on April 2, 2018.

I just wanted to put this out there, and I don’t have a ton of things to say right now, but watch this space for much more stuff to come. This week is Directions Asia in Bangkok, and there will be plenty of information coming out of that event. With the release of the new product there will be some new requirements for partners to get their IP into AppSource, and I will have plenty of things to share about that. Microsoft is working incredibly hard on getting all the information out there, including new material in the learning portal (the link that I had wasn’t working when I wrote this, so I owe you that one) and a ton of new and updated content in the new technical documentation site called ‘docs’.

I am in a very fortunate position to be involved in the very early stages of Business Central, I’ve had the pleasure to be working with the new product for a while now. I have to say I was skeptical of the Web Client and having everything in the cloud, but as I’ve gotten used to how it all works, and how the new ecosystem is forcing to improve our internal processes, I can’t help but be happy about the way that my industry is taking me into a more professional approach to my business. No longer do we get away with flying by the seat of our pants, and do whatever we can get out there in a short term, quick and dirty way. We must adapt and get ALL of our ducks in a row. Our approach to design, architecture, coding, marketing, delivery, automated testing, EVERYTHING must be in top shape in order to be successful in the new age.

This is the time where you have to adapt, or be disrupted. For me personally, it scares the heck out of me, but I also welcome the challenge. I am looking forward to what is to come next, I hope you are too.

Install from .vsix

This is a quick blog about installing the AL language for Visual Studio Code from a .vsix file.

When you create a developer preview Azure VM for AL development, you get a landing page to access this VM. The script that creates this VM will put all the components on the VM that you need to do your development, including the correct version of the AL Language extension for VS Code.

If you want to do your development locally, you will need to put the right version of the AL Language extension on your local installation of VS Code. Lucky for you, there is a link on the landing page for your VM that will download the installation package into your downloads folder. The file has the extension .vsix, which is what VS Code needs.

All you need to do is press Ctrl+Shift+P and type ‘vsix’ in the command palette, and VS Code will suggest ‘Extensions: Install from vsix…’. When you select this, you need to browse to the file, and hit the ‘Install’ button. If you already have another version of the AL Language installed, you’ll need to disable that, so that there is no confusion about which one VSCode uses.

Keep Your Data When Developing

One of the most frequent questions I get in our workshops is how can I keep my test data when I am developing in AL. For this, Microsoft has given us a new property that you can set in launch.json, read on to learn the details :).

Up until now, every time you hit F5 in AL to test your app, you have to start from scratch to enter some test data, of put together some data creation code in an install codeunit to populate your tables automatically. The reason is that the default behavior of the AL Language extension was to completely recreate and rebuild the app, every time you hit F5. This means that behind the scenes, your current installed version is completely destroyed, and then VSCode recreates the .app file and publishes/installs the app for you. As a consequence all the test data goes kerblammo, and you are stuck having to enter all the test data again. Not a big deal if it’s a setting or two, but if you added some fields to an existing table that you need some values in, and you need some data in your custom tables, it can get very tedious very quickly.

Microsoft has given us a new property called ‘schemaUpdateMode’ that goes into launch.json. If you leave this property out, the default behavior stays the same, so it recreates the app every time you hit F5. You can of course also add the property and set it to “Recreate” just to make sure. If you want to keep your data though, you can set it to “Synchronize”, which will keep your data intact.

Be aware that if you increase your app version, you will also need to use Powershell to Synch and run the data upgrade.

Announcing NAV 2018

Real quick one today – James Phillips announced General Availability of Microsoft Dynamics NAV 2018.

Marko announced it on TwItter:

Which was retweeted by just about everyone I know. Promise made at the closing keynote at Directions in Orlando is hereby delivered!

Can’t wait to see when they announce “Tenerife”.

NAV Techdays 2017 Recap

My favorite week of the year has just ended. I’m in the high speed train from Antwerpen back to Amsterdam, which is over just like that so I don’t have much time to make this anything elaborate.

As per usual, the organization was superb. The venue is fantastic, with a great expo area, lots of good food and drink choices, and the seats in the great rooms are just about the most comfortable seats you can imagine. The Kinepolis is a movie theater that you can also rent for events. I think I speak for everyone when I say this is one of the most important features, and I hope we will never have to move to a different location.

My week started with a full day pre-conference workshop about automated testing in NAV. This workshop was hosted by none other than Luc van Vugt, who, as per usual, delivered a solid day of learning. I had misread the workshop description and the correspondence that we had prior to the workshop, so I did not get everything out of it that I could have, but Luc was so kind to offer assistance to me so that I could do the exercises at home. Any time you have an opportunity to train under Luc, you should take it.

My company, Cloud Ready Software, was a sponsor, so we had a booth to staff. It was a pleasure to be there and talk to anyone who had any questions about what we can offer.

As per usual, the two conference days were stuffed with 90 minute deep-dive sessions on any topic you can think of. My favorite ones were Waldo’s “Rock ‘n Roll with VS Code”Anders and Nikola’s “Creating great APIs”, and the Docker session by Freddy, Tobias and Jakub. Fortunately for you, you can watch all of the sessions on YouTube, Luc had all of them uploaded within a week of the conference.

I can’t say enough about this conference. For any technical resource in the NAV channel (and I include Dynamics 365 for Finance and Operations in that category), NAV Techdays is a must to attend, every single year. This is the second time that I’ve gone, and I am still kicking myself for not going the first few years. If I can help it, I will not make that mistake again.

See you next year in Antwerpen!

Directions 2017 EMEA Recap

After a supremely busy week, with lots of last minute session and workshop work, I’m getting ready to go sightseeing in Madrid with my wife and some dear friends. This week has been frustrating, as well as satisfying, as well as educational, although not as educational as I would have wanted because I was too busy doing sessions and workshops to have any time to attend any myself.

One of the key takeaways is that Microsoft is going to release NAV 2018 in December this year, so 4-5 months ahead of the spring release of “Tenerife”. The whole white label thing seems to be gone altogether, so partners can continue to use the Microsoft name in their marketing for their Dynamice 365 products. Still, there is some need for clarity about licensing, and about the long term future.

What everybody needs to acknowledge is that we now live in a world that is being disrupted continuously. Today, Microsoft is heavily investing in their current roadmap, one that they feel very strongly will succeed in the long run. You must understand that this world is moving at the speed of light, and if something happens to our ecosystem, Microsoft WILL react. When they do, they will focus on what they feel is their best chance to survive in this changed world, so it is up to US to make that happen.

This slide was shown at one of the presentations, and it shows where Dynamics 365 “Tenerife” fits into our world. As you can see, it is just one of many boxes. If the surrounding boxes change, there may be a completely different role for “Tenerife”. It might very well happen that the market shifts in such a way that there won’t be a need for it at all. Given everything that I’ve seen this week, I think the “Tenerife” story is awesome, and we are going to absolutely crush it in terms of features and capabilities. What I don’t know is whether we can grow this cloud business enough to remain strong over the long term. The key though, is to fully embrace the entire picture, not just the ‘NAV’ part of it. The days of just ‘NAV’ are over, and they’re not coming back.

If anything, what I get out of this week is that we all must play a crucial part in the success of our entire market. WE the partner channel WITH Microsoft, NOT Microsoft alone, will determine the success of this market. If you want to be a part of this ecosystem, you better adapt and embrace what is here to stay. Fighting it is a losing cause, and you will be left behind.

I say we take a deep breath, a chill pill, we take a good look at what we have to do, and we roll up our sleeves and make it happen.

Directions EMEA 2017 – Madrid

For Directions EMEA, we are going back to Madrid. I am really looking forward to this one, because I have some business to take care of on Mallorca. While I am there I will spend some quality time with some great friends there, and in the planning stages my wife and I decided that it is of utmost importance for her to come with me. So my business trip now has a personal flavor as well.

My company Cloud Ready Software is going to host a record number of sessions (13) and workshops (10), of which I will be hosting 3 workshops and 3 sessions. We also have a booth, but I am worried that we will not have much time to actually BE at the booth since we are all very busy with sessions. My contributions are:

  • Build your 1st extension in VSCode – This is a 2 hour workshop in which we will introduce you to Visual Studio Code, and you will build your first real extension using this development tool. This is the same workshop that we did in Orlando at Directions NA this year.
  • Migrate your IP to VSCode – in this 2 hour workshop I will present what you need to look at when you want to move your IP into Dynamics 365, we’ll take a look at how you can assess your current IP and do a feasibility study. In addition, you will get your hands on some PowerShell scripts to convert your C/AL objects into AL objects.
  • SCM Simplified – this session covers an introduction to Source Code Management, and why it is important for you to start using it today
  • ISV Development Center (session) – At the Inspire conference in Washington DC, my company Cloud Ready Software was announced as one of only a handful of ISV Development Centers. At Directions we will host a session to explain what this means and what we can do for you.
  • Technical partner panel (Q&A session) – a bunch of Microsoft people and some MVP’s will answer any technical and non-technical questions you may have about the upcoming version of NAV and the new technologies that are used to develop extensions and apps for Dynamics 365.

Some of these sessions are a repeat of the ones that we did in Orlando, and some of them will be converted from mere sessions to workshops, since we had gotten some feedback that it would be great to get some hands on material in addition to the presentations. We are always happy to oblige such requests.

Come look us up at our booth, and leave us a message if we are not there, we really want to talk to you!

CRS is an ISV Development Center

After months of intense scrutiny by Microsoft, and after having kept this quiet for a while once we knew that we were going to be accepted, we’ve finally come to the announcement part at the Microsoft Inspire conference that was held this week in Washington DC. I am very proud to say that we are one of only a handful of companies that have Microsoft’s trust to be a partner to their ISV partner channel.

My company, Cloud Ready Software, is one of only 7 companies globally to be selected in the initial group of ISV Development Centers, of which only 4 have a real competency in Dynamics NAV and Dynamics 365 for Finance and Operations Business Edition.

The program was founded by Microsoft to be a buffer for getting the ISV partner channel’s IP into the cloud. There is only a small number of companies worldwide in the Dynamics 365 area that really focus on building products for the cloud. Cloud Ready Software had been helping partners develop their products for the cloud for years, and we have held countless workshops to teach the partner channel about the latest technologies. It seemed like a great fit for us to apply for the program, and we are very excited about the prospect of making this our niche.

Essentially, our job is to help ISV partners in any way we can to get their IP into the cloud. We can do workshops and training for their staff, but we can also participate in projects directly. We can be a way to extend bandwidth in analysis, design, or development efforts, and we can also help with project management and/or guidance in any capacity necessary.

As an ISV Development Center, we have access to the latest technologies, and we are actively involved in developing and promoting those technologies into the partner channel. We can even help be part of a proof of concept to prove the viability of new technologies in cutting edge projects.

It is important to note that we are the partner’s partner. We are not after end users, in fact one of the stipulations of being in the IAV Development Center program is that we are not allowed to work directly with the end user without prior authorization by the partner. Should an end user company contact us, we are obligated to get in touch with their partner of record, to make sure that there is no conflict of interest.

 

Extensions V1 vs V2

You might have heard people talk about “Extensions v2”, and maybe that doesn’t make a whole lot of sense. Let me take a few minutes and try to explain the concept to you.

Back in 2015, Microsoft announced the concept of extensions to us, in this blog post. I remember reading this article, and being thoroughly confused. At the time I was not in a technical role, and I had let my technical knowledge slip for just a minute it seems.

Extensions v1

For extensions v1, development is done in good old C/SIDE. There are severe limitations as to what you are allowed to do. For instance, you cannot add values to option strings in table fields, and you cannot add code to actions on pages. I won’t get into the details of those limitations, but you must be aware of what you can and cannot do for extensions, because in C/SIDE you can do a LOT more than what you are allowed to do.

The extension itself is compiled in a so-called .NAVX file, also know as a NAV App file. To get to this package file, you must use PowerShell Cmdlets to export the original and modified objects, calculate the delta files, and then build the .NAVX file. To deploy this .NAVX file, you then must use another set of PowerShell Cmdlets.

Especially the development part can be cumbersome. There are many things you are not allowed to do, and as you build the .NAVX file, the system will yell at you when you did something wrong. There are many moving parts, and it takes a lot of discipline to get it right

Extensions v2

For extensions v2, development is done in Visual Studio Code (also known as VSCode), using the AL Language extension. Since you are no longer working in C/SIDE, only the allowable things are allowed. You simply cannot do anything that the tool is not capable of doing. You no longer have to export original objects and compare them to modified objects. Essentially, you are programming the delta files directly in VSCode.

Deploying the solution works simply by building the project from VSCode. You hit F5 and VSCode will build the package and deploys it to the service tier that you specify in the launch file. Deploying the app to a test system still happens with PowerShell Cmdlets.

Hopefully this clears it up a little bit. Once you understand the differences, it’s not so intimidating any longer.