Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV forum
Suggested answer

How to uninstall an extension automatically (And Delete Extension Data) through API

Posted on by 10
Hi,

I've made an extension with some codeunits in AL.

I'm trying to automate the deployment / update (including uninstall of previous version).

Currently I'm able to publish it, uninstalling it, but the files remain. Another question helped me find BC Automation APIs:

Introduction to automation APIs - Business Central | Microsoft Docs

These offer Microsft.NAV.install, Microsft.NAV.uninstall, Microsft.NAV.uninstallAndDeleteExtensionData endpoints.

The second one runs smoothly but files remain at the end. 

And when I try to run uninstallAndDeleteExtensionData, I  get this (I removed the ids)

"{\"error\":{\"code\":\"BadRequest_NotFound\",\"message\":\"No HTTP resource was found that matches the request URI 'api.businesscentral.dynamics.com/.../Microsoft.NAV.uninstallAndDeleteExtensionData?tenant=msweua...&aid=FIN'. CorrelationId: ....\"}}"

What am I doing wrong ? Are there some differences that I should know when I call uninstallAndDeleteExtensionData, compared to uninstall ?

Thank you in advance.

  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 69,933 Super User 2024 Season 2 on at
    RE: How to uninstall an extension automatically (And Delete Extension Data) through API

    Hi, It seems that the extension that needs to be uninstalled is not found.

    I have tried to use the API to uninstall the extension, I hope the following information can give you some inspiration.

    https://yzhums.com/6287/

    pastedimage1635471671331v1.png

    https://yzhums.com/12259/

    Hope this will help.

    Thanks.

    ZHU

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,554 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,588 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans