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
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
Hope this helps.
Thanks.
ZHU
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
Hi, try to using table 2000000153 “NAV App Installed App”
More details: https://yzhums.com/22648/
Hope this helps.
Thanks.
ZHU
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
Hi, you can try codeunit 2504 "Extension Management"
Here is a simple example of the installation
Hope this helps.
Thanks.
ZHU
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
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.
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.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,188 Super User 2024 Season 2
Martin Dráb 230,030 Most Valuable Professional
nmaenpaa 101,156