web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested answer

Unpublish published extensions not installed

(0) ShareShare
ReportReport
Posted on by 735

Hello,

i have a requirement to search for all published extensions, that are not installed in a Business Central environment (on cloud), to unplish them all.

how to achieve this through Visual Studio? i mean how to write this extension?

Regards,

David

Categories:
I have the same question (0)
  • Suggested answer
    YUN ZHU Profile Picture
    62,477 Moderator on at
    RE: Unpublish published extensions not installed

    Hi, I've also checked all the relevant tables and there really isn't one that works.

    The way I can think of so far is to use the Automation APIs. Although I think it's a bit complicated.....

    https://api.businesscentral.dynamics.com/v2.0/d8f36038-1f93-4543-affc-5dc92b6ee871/Sandbox221/api/microsoft/automation/v2.0/companies(25333785-59e9-ed11-884d-6045bde998ec)/extensions

    pastedimage1685926352156v2.png

    Hope this helps.

    Thanks.

    ZHU

  • David Tailor Profile Picture
    735 on at
    RE: Unpublish published extensions not installed

    i can find the issue here , that it works for installed app, however my requirement is to find all apps published but not installed.

    in the table "NAV App Installed App", i will not find the extensions not installed (but published)

    i checked also NAV App Published App table, it is also OnPrem scope.

    Regards,

    David

  • Suggested answer
    YUN ZHU Profile Picture
    62,477 Moderator on at
    RE: Unpublish published extensions not installed

    Hi, try to using table 2000000153 “NAV App Installed App”

    More details: https://yzhums.com/22648/

    Hope this helps.

    Thanks.

    ZHU

  • David Tailor Profile Picture
    735 on at
    RE: Unpublish published extensions not installed

    Hi Zhu,

    kindly see the following code and the error below:

    it is giving Onprem scope error.

    Note: The extension is searching for any published application not installed: the requirement is to unpblish all applications published with installed = false.

    Regards,

    David

  • Suggested answer
    YUN ZHU Profile Picture
    62,477 Moderator on at
    RE: Unpublish published extensions not installed

    Hi, you can try codeunit 2504 "Extension Management"

    Here is a simple example of the installation

    https://yzhums.com/30112/

    Hope this helps.

    Thanks.

    ZHU

  • David Tailor Profile Picture
    735 on at
    RE: Unpublish published extensions not installed

    Hi Kaspars,

    i know i can open Extension management form, however i need it to be through code (automated) and it is required for cloud.

    Regards,

    David

  • KasparsSemjonovs Profile Picture
    3,172 Moderator on at
    RE: Unpublish published extensions not installed

    Just open Extension Management and filter out IsInstalled=NO.

    Feels like it would be easier to add as a script and schedule it on the server - but it can be done only for on-prem BC.

  • Suggested answer
    Nitin Verma Profile Picture
    20,991 Moderator on at
    RE: Unpublish published extensions not installed

    Hi,

    You can use Table ID - 2000000206 in VS code and create a Page by this table and filter your app or publisher name and you can check whether your app is installed or published.

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

Dynamics 365 Community Update – Sep 16th

Welcome to the next edition of the Community Platform Update. This is a weekly…

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 > Small and medium business | Business Central, NAV, RMS

Featured topics

Product updates

Dynamics 365 release plans