Upgrade and reinstall Dynamics NAV extensions without data loss

In the version 2.0 extensions of Dynamics NAV, there has been an insignificant flaw [H] When reinstalling an extension that contains new tables or new fields in existing tables.

The new data were deleted.

With the Dynamics NAV 2018 CU2 release, that has been corrected.


In order to test that, I have created a simple extension adding an extra table to Dynamics NAV: ShoeSize.

Apart from that, I have added a new field to the Customer table and Card page: “Shoe Size Code”.

The workspace looks like this:

Publishing and installing the extension, I can search for the “Show Size” page and create a new size:

I can add the size to customer 10000:

Previously after publishing and installing the extension, the data would disappear:

And the also from the Customer Card:

But in the CU2 version, now all data remains, even without the upgrade codeunits:

And the Customer Card:

So, now there are no more excuses, we can start creating real solutions with the customers.

According to a blog post from the Microsoft Dynamics development team:


It is now also possible to create upgrade codeunits to handle data to be changed during upgrade.