17 changes Microsoft can make to dramatically improve Dynamics NAV upgrades

When I do upgrades, I have to wonder if Microsoft really wants to upgrade the 70,000 old (pre 2013) NAV customers out there.
Here are some things Microsoft can do to make upgrades less costly and more likely to happen – plus not lose their installed base in the future to competitors’ products. (Plus increase the software maintenance revenue stream – more money to Microsoft bottom line.)

(They will all have to do something eventually, and we would like it to be with Microsoft. Make it too expensive and they will move to someone else’s software.)

  1. Eliminate the magic of NAV 2013 – why should every upgrade require loading NAV 2013 plus the obsolete ODBC.INI from the NAV 2013 SQL Server prerequisites folder – to convert the database to Unicode. Make this a standalone utility that runs separate from NAV.
  2. Stop converting tables that will be deleted in the upgrade like all the obsolete dimension tables.
  3. Tables – Merge new to existing – allow compile errors so we do not have to strip out code. Better yet – compile after creating the new fields, so that the code recognizes them when it compiles.
  4. Make PowerShell work for adding new protected fields. In 1995, Bill Gates wrote the famous Internet Tidal Wave memo. Let’s use the Internet to determine if the license being used has a right to use the tables and fields being added by PowerShell. Have PowerShell use an Internet connection to check the Microsoft licensing database to check if the protected fields and tables being added are in the license and the correct field numbers and names. It has been over 20 years since the memo – let’s use the Internet to make our lives simpler and reduce upgrade costs.
  5. Provide upgrade directly from NAV 2009 to all new releases. Yes, we know they should have upgraded earlier, but do we really want to lose them by making the upgrade more expensive? Plus Microsoft does the work once instead of hundreds of partners each doing the same work in different ways.
  6. Support direct upgrades for older versions as well. We do not want to eventually lose NAV customers running on versions prior to 2009. If you go back to 2.6, you will catch most of the old installed base.
  7. Provide a utility to upgrade NAV 2009 reports to the new version – or at least the NAV 2013 version. Surely NAV 2013 is not a magical release that has the special power to import NAV 2009 objects and upgrade them to be usable by the developer – and the magician has left the building?
  8. Provide a list of all fields that have increased in size by release. This problem even catches the Microsoft developers, as well as all the ISVs and partners.
  9. Provide in PowerShell a utility to check for moving larger field sizes to smaller field sizes – Microsoft could use this too – it generally takes a few cycles to fix all the length expansion problems.
  10. Provide virtual tables that have fields for all the properties – this makes it easier to check for linked tables, edit properties, etc.
  11. Provide data checking tools – Classic NAV has a date error routine for the upgrade to SQL – let’s add a dimension checking tool. Also a broken relationships tool. The conversion routine crashes when some of these relationships are broken. Running the database test on everything takes too long.
  12. Fix the upgrade utilities to be fault tolerant. The resume does not work without code changes – examples – insert new source code – should make it a conditional insert – jobs – instead of reading the temp job, it reads the job table and crashes when the temp job tables has already been processed and the records deleted.
  13. Fix the update user id to use sql server to update to the domain\user format – large databases take too long to convert otherwise – large enough and the process crashes. Even in a large database, the sql update runs in minutes versus many, many hours.
  14. NAV 2015 is the only release where we can do a force sync and not destroy the upgrade routines. Provide a way for us to do the force sync in the new releases without affecting the upgrade –especially if you provide a single hop from NAV 2009.
  15. Allow partners to delete objects not in their license range by simple deleting. Old ISV objects are a nuisance we currently have to work around.
  16. Provide a menu design tool that highlights the changes to the menu being edited in the designer. Ever since 4.0, it has been a black box. The layered approach works great for adding new menu items, but not great for finding what has been added in the menu object, and reading the menu text export file does not help.
  17. Add to the pre-check routine in step 1 of the conversion – company names with special characters that have to be renamed and a list of all linked objects.

The future is already here – 20 Microsoft products that are blazing the trail


There is a famous quote: “The future is already here — it’s just not very evenly distributed.” By William Gibson (Science Fiction author)

Since the future is already here, it is time to ask ourselves if we – you and me – are actually in it.

In our corner of the Microsoft Dynamics world, here are some of the future technologies that are with us today.

  • AL – replacement programming language for C/AL (now co-existing with C/AL)
  • Visual Studio Code – new to us – not so new to others
  • Docker – started with Linux – now usable with Windows 10 and Windows Server 2016
  • GitHub
  • Snippets
  • Microsoft Flow
  • Microsoft Graph
  • Common Data Model or Common Data Service
  • PowerBI – not so new, but is everyone using it yet?
  • PowerApps – connect apps with a wide variety of standard apps
  • PowerShell – not new – but how many people know it well?
  • Quantum Computing – yes – Microsoft released Q# so we can get started emulating quantum computers
  • BlockChain – Microsoft has CoCo
  • SQL Server 2017 in memory files – currently HP only, others sure to follow (plus column store?)
  • Extensions version 2 – the true start of add-on solutions and customizations that will make upgrades easy – maybe even push button in a couple of releases
  • Embed apps – part of the above for vertical solutions
  • Connect Apps – use APIs – and hopefully the Common Data Model
  • Azure functions – code to call from NAV
  • Image analyzer – is it a bird, is it a plane, no it’s a Cronus bicycle or even a human being
  • R – a language and environment for statistical computing.

If the above 20 bullet points have not exhausted you, then read on for a brief discussion of each of them, and then ponder how much future you still need to absorb!

AL – C/AL compiles down to C#, and I was wondering if C# would replace C/AL. Instead, Microsoft has come up with a language that looks very much like C/AL, but runs in the Visual Studio Code environment. AL is more JSON friendly. “JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write. It is easy for machines to parse and generate.” (from JSON official site) Many languages can handle it directly – including AL – and it can even handle XML.

AL is available from the NAV 2018 DVD – modern development environment – plus available from the Visual Studio market place for free. Make sure you install the correct version for your NAV.

Visual Studio Code – This is cross-platform, lightweight and free. It allows you to download support for a number of languages as extensions including Dynamics NAV AL, Python, F#, JavaScript, and many more. There are additional extensions available for making development work easier and faster.

DOCKER – Think of Docker as a lightweight VM. Originally developed for Linux, but Microsoft has adopted it for the Windows Server 2016 and Windows 10 and is actively supporting it. Docker allows you to isolate some of the services in a Docker container while still using the operating system for the remaining services. This is important to us for several reasons:

  • Microsoft provides regular NAV preview builds with all the updates
  • It provides a means of running multiple installed versions and build – each in their own Docker container
  • You can use an external SQL Server or the SQL Server Express included in some of the Containers
  • You can even use a Docker Container to host VPNs – which is useful for those of who support multiple customers with conflicting VPNs

GITHUB – a popular repository for open source code – Microsoft and many of the NAV MVPs and NAV developers provide free code for AL and PowerShell. Even VSTS (Visual Studio Team Services) has a link to it.

SNIPPETS – these are snippets of code you can use with your AL code to save you development time. They could come from GIT or your own library.

Microsoft FLOW – from the Flow web site: “create automated workflows between your favorite apps and services to get notifications, synchronize files, collect data, and more”. One use in NAV is approvals.

Microsoft GRAPH – allows you to pull together, using the API, data from your different applications – mail, contacts, documents, devices, etc. Examples include smart workflows, custom dashboards, collaboration information.

Common Data Model (CDM) – basically a way to transfer data between applications using common data types for addresses, email, images, etc. Used by PowerBI, PowerApps, and Flow. This includes Microsoft products – Excel, SQL Server, NAV and other vendors like Salesforce. Microsoft includes many different services as part of this program. Basically allows the user to pull together business information from different systems to provide a unified model for their business.

PowerBI – a significant step up from Excel, and a less expensive and easier tool than a data warehouse.

Power BI is a suite of business analytics tools that deliver insights throughout your organization. Connect to hundreds of data sources, simplify data prep, and drive ad hoc analysis. Produce beautiful reports, then publish them for your organization to consume on the web and across mobile devices. Everyone can create personalized dashboards with a unique, 360-degree view of their business. And scale across the enterprise, with governance and security built-in.”


PowerApps – lets you connect to a wide variety of applications (https://powerapps.microsoft.com/en-us/) – like PowerBI, easy to use – comes with Common Data Service using CDM (mentioned above). Enables the power user to create apps without writing code. It comes with hundreds of standard business entities already defined – like customer, product, lead, etc. See https://docs.microsoft.com/en-us/powerapps/connections-list for a list of connectors – much more than just Microsoft – Salesforce, Facebook, and Twitter for example.

PowerShell – this is a powerful scripting language that is included with Microsoft Windows. Microsoft provides administrative and development shells with the NAV product. You can add and execute your own scripts. It is a cross between Unix/Linux scripting and DOS command language on steroids.

Quantum Computing – while the first quantum computers have been released, Microsoft has added a language Q# that allows the developer to emulate a quantum computer. Currently a quantum computer needs to be maintained at close to absolutes zero, so it is likely to remain a cloud offering. I can see it initially being used to solve the big problems like aircraft and crew scheduling – and rescheduling. Over course of time, the cost to run a quantum computer should decrease to where the NAV size companies could use it for transportation routing and production scheduling. Currently it looks like quantum computing will be used to provide answers where the software needs to consider a large number of possibilities. ERP systems will likely remain on traditional computers. (If this seems farfetched, imagine taking your smart phone back in time to the birth of the modern PC and demonstrating it in the 1980s!)

Blockchain – most of the attention is focused on Bitcoin, however the technology is being incorporated in tracking non-financial transactions like food from farm to supermarket shelf. Walmart has experimented with this technology. Microsoft introduced CoCo Framework for corporations to use in securely tracking transactions. (https://azure.microsoft.com/en-us/blog/announcing-microsoft-s-coco-framework-for-enterprise-blockchain-networks/) Besides food, DOD, commercial aircraft, and any other discipline needing secure and fast traceability will find this useful.

SQL Server 2017 and Azure SQL Server – what may not be well known is, with Azure SQL Server, the user always gets the most up to date version of SQL Server – including all the monthly updates and enhancements. 2017 steps up the performance of in-memory OLTP – included in your base product for SQL Server 2017 and Azure SQL Server – most features in the premium editions. This is in addition to the columnstore indexes (analysis and reporting) – premium edition.

Dynamics NAV 2018 – extensions version 2 – these are much better than version 1. NAV has a new application language “AL” that the developers use inside Visual Studio code (free downloadable product) to develop extensions. With Extensions 2.0, NAV finally has a way for third party products and customizations to be engineered so they can be brought forward to a new release easily – theoretically with no work, but that will take a year or two to fully achieve this goal. The way it accomplishes this if to provide page and table extensions that are saved separately from the standard pages and tables. For custom code additions to standard fields and codeunits, events can be used in separate codeunits instead of modifying standard code. There will be exceptions to this, but Microsoft will work with developers to eliminate these exceptions.

Dynamics NAV embed apps – this is a bit of a fuzzy term – it can be used to embed NAV apps in SharePoint for example or it could be an app provided by an ISV

Connect Apps – uses APIs – example – Microsoft provides a QuickBooks payroll interface to NAV

For example.

Azure functions – invoke from AL – see link to master of the .net and Java universe for NAV – http://vjeko.com/invoking-azure-functions-al/ – you will note that Java is the way to go with AL – even though .net will be supported on premise later. It also introduces terms strange to the typical NAV developer like JSON and REST – however in a form NAV developers can use. Microsoft will may upon request add usable functions if we provide them the original. When Microsoft does it, they do it in a much cleaner faster way by avoiding the dreaded “Reflection”. (If you do not know what Reflection is, then you are very happy to let Microsoft do it.)

Image Analyzer – new with NAV 2018 – you download and install it, and now the user can use it to analyze images and insert the characteristics into NAV – including the world famous Cronus bicycled – plus you – let Microsoft select your age for you – hopefully you will like it!

R – An independent language and environment for statistical computing. It’s has really good graphical capabilities; plus good machine learning capabilities. It is an open source environment that was added into the SQL Server ecosystem by Microsoft to SQL Server 2016.

Dynamics NAV data integrity violated by multiple service tiers

Issue Definition: Client has multiple service tiers. If a user on one service tier makes a change to a customer or sales order, a user on another service tier can then make a change to the original data and not receive a message that another user has changed the data.

Is there a setting change we need to make to the service tiers to prevent this from happening?

Microsoft solution

Scope Agreement: The scope of this case will be to advise on the scenario in the issue definition.

I had development review this a while back in a similar case and what you’re experiencing is expected behavior.  In NAV 2016, each NAV Server has a “Listener Thread” which checks to see if there have been changes approximately every 30 secs.  This check is done per table.  Depending on the result of the check determines whether the cache will be flushed or not.  If a record is changed on the NAV Server, then the change is placed on a “list of changes”.  This list is flushed approximately every 30 secs. as well.  There is one change that the previous statements don’t address which is SQL direct updates.  So there is also a “Timer-Flush” that was done to ensure that cache is flushed periodically.  There is a setting (DataCacheSize) in the CustomSettings.config file.  Changes to this value can cause performance issues if the value is set too low which would cause data to be flushed and/or retrieved more frequently.


  • If a change is made on NST1 and read on NST2, it could actually take as long as a minute in the worst case.  However, it is more likely to be around the 30 sec. period.
  • If a change is made on NST3 and read on NST3, then the record will be available immediately.

Ways to ensure the cache is flushed in a more timely manner

  • Use commits to force the cache to be flushed
  • Use a LOCKTABLE followed by a FIND will flush the cache for that particular table.

Problem: using the solution supplied will require changing massive amounts of standard code.

This seems like a major design flaw.

I am hoping the SQL Server experts in the Dynamics NAV group could come up with a much better solution.