Al: Data gets deleted after the extension version is updated.

Created on 2 Jan 2018  路  9Comments  路  Source: microsoft/AL

Hi,
I've created an extension having table. I've also added the upgrade codeunit but after installing the extension through the Visual Studio Code, the data gets deleted related to the extension.

duplicate enhancement shipped

Most helpful comment

We have just implemented that feature, so you can publish the same extension multiple times without losing the data.
It will be available in the January update.

All 9 comments

Hi,
If you want to run your upgrade code you need to use the Powershell commands, since when publishing with VSCode it uses SyncMode Clean internally.
You can read more about it here: https://docs.microsoft.com/en-us/dynamics-nav/developer/devenv-upgrading-extensions

Would it be possible to determine how extension data is handled by VS Code with a preference setting somewhere? It would good to have to option to preserve the data (as if you were doing a regular uninstall, unpublish, publish, install).

I'll second that jimmymcp's request for an app.json setting for this, we're spending lots more time than we need to, because of this default behaviour at the moment.

I also agree with this. We are losing a lot of time during development.

We have just implemented that feature, so you can publish the same extension multiple times without losing the data.
It will be available in the January update.

That is great news, that would solve #62, #310, #462 #555, #722, #1079, #1198.

However, I noticed you mentioned feature instead of fix, and I wanted to confirm that this will be backported into NAV 2018, as mentioned in #722 by @StanislawStempin. Will that make it into CU1 on time?

It will be backported, but it will first be available in CU2.

This feature has been implemented and you can read more about it here:
https://docs.microsoft.com/en-us/dynamics-nav/developer/devenv-retaining-data-after-publishing

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kine picture kine  路  3Comments

AndersMad picture AndersMad  路  3Comments

TinaMenezes picture TinaMenezes  路  3Comments

lvanvugt picture lvanvugt  路  3Comments

RonKoppelaar picture RonKoppelaar  路  3Comments