In Business Central I would like to enable / disable a field in a page extension based on if a 3rd party extension is installed. I do not want to have a dependency on this 3rd party extension since most of the time it will not be present and our extension is not dependent on it.
Does anybody know what would happen if an extension is included as a dependency in the app.json but at runtime it's not installed? It's installed in the development environment but not runtime. My assumption is it will fail the installation of my extension.
For what I'm trying to do, the 3rd party extension data will not have to be updated but I would like to read it.
Is there a way to determine if a 3rd party extension is installed?
You could use the command:
[Ok := ] NavApp.GetModuleInfo(AppId: Guid, var Info: ModuleInfo)
Source: Microsoft Docs
It will return false if the supplied AppId is not installed, otherwise, you'll get all info about the installed app in the Info variabble.