Skip to main content

Notifications

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

Unpublish published extensions not installed

Posted on by 751

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

  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 73,296 Super User 2024 Season 2 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
    David Tailor 751 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
    YUN ZHU 73,296 Super User 2024 Season 2 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
    David Tailor 751 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
    YUN ZHU 73,296 Super User 2024 Season 2 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
    David Tailor 751 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
    KasparsSemjonovs 3,924 Super User 2024 Season 2 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
    Nitin Verma 21,091 Super User 2024 Season 1 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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

New! Quick response templates⚡

Save time with the new custom templates!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,188 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,030 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans