AL icon indicating copy to clipboard operation
AL copied to clipboard

Events on uninstalling an extension

Open RafaelKoch opened this issue 9 years ago • 9 comments

Hi,

we would love to have events raised when a user installs or uninstalls an extension.

On installing we could prepare data or user guidance a on uninstalling we could make sure we remove data the Extension had at some Point put into NAV tables.

RafaelKoch avatar May 10 '17 09:05 RafaelKoch

This is a very cool idea

Gallimathias avatar May 11 '17 08:05 Gallimathias

Thank you for the suggestion. We are actively considering the installation event. Uninstallation requires more investigation as it potentially impact the infrastructure if the data removal during uninstall fails for some reasons.

StanislawStempin avatar May 11 '17 08:05 StanislawStempin

@StanislawStempin did you come up with a solution to subscribing on install or uninstall events?

RasmusTidselbak avatar Aug 21 '17 10:08 RasmusTidselbak

Installation events have been added as described here: https://docs.microsoft.com/da-dk/dynamics-nav/developer/devenv-extension-install-code

Uninstall event is still on the backlog.

StanislawStempin avatar Jan 03 '18 12:01 StanislawStempin

We would also need either some events for uninstalling an extension or - at a minimum - access to "NAV App", if we wanted to subscribe to the "OnAfterAction" events for the Extension Management and Extension Detail pages.

However, the best option for this implementation would be a codeunit subtype "Uninstall" with the appropriate triggers that also indicate, if this was uninstalled via PowerShell or UI.

The use case for this is that - when you use, for instance, workflows to block orders, there is no way to remove the blocking conditions via code and when the extension is uninstalled, the system is left in an inconsistent state: Orders are blocked via workflows that then won't execute anymore, because the code is missing.

Please also look #1271

pzentner avatar Jan 23 '18 11:01 pzentner

Are there any updates on this functionality coming into play? We have a requirement for making changes during uninstalling

nmahate avatar Oct 26 '18 16:10 nmahate

@StanislawStempin is the any solution on this yet or any workaround? As @pzentner mentioned, the workflows get stuckt when uninstalling our extension and leave the database in an inconsistent state.

kguldbaek avatar Jan 28 '19 13:01 kguldbaek

@StanislawStempin Is there any update on the UninstallApp event? I also have a situation with Workflows and Data Exchange Framework where this would be very useful.

teastman79 avatar Mar 06 '19 09:03 teastman79

I am going to close this suggestion as requests are tracked on http://aka.ms/bcideas. In this case there is already an entry for this topic, so please vote on that: https://experience.dynamics.com/ideas/idea/?ideaid=2ee9e0ed-6cc5-e911-b083-0003ff68ac6b

As a side note, while the request makes sense, there are technical issues with supporting it, as any code running as part of the uninstall process could impact upgrade and require transactional rollback as well as sync across extensions (e.g., multiple extensions desiring access to the same data being remove by others), complicating it.

pborring avatar Nov 26 '21 13:11 pborring