Dynamics 365 Business Central- Check If An
Extension Is Installed

In the Business Central, some time we would like to perform certain operation depended upon another extension installed on the same tenant and the only idea comes to our mind is via app dependency, but there is something else which can be useful if you are only looking to access the data from the other extension. In today’s Blog we are going to talk about how to check another extension and its data deployed on the same tenant.

1. First Approach

Using the Microsoft library called Microsoft.Dynamics.Nav.Apps.Management We can use Get-NAVAPPinfo to get the basic information about the Business central APP installed on the tenant. [Ok: =] NavApp.GetModuleInfo(AppId: Guid, var Info: ModuleInfo) It will return false if the supplied AppId is not installed, otherwise, you’ll get all info about the installed app in the Info variable. So, we can create a procedure like in image below.



We need to pass AppId then NavApp.GetModuleInfo(AppId, Info) will return true if extension(app) is installed else this will return false.

2. Second Approach:

For this second method we are required to know the Table Id of that extension. As we know, we can use RecordRef to open any table in Database. RecordRef.Open(TableNum) Unfortunately RecordRef.Open() does not return a Boolean value, so we can’t just test RecordRef.open() to know if that table is present or not. We can use a [Try Function], [Try Function] will return a ‘false’ on an error, rather than throwing the error and stopping.



Then we can use this function to make the required decision.



Hope you find this information useful. for more information please do visit our website allgrowtech.com and there you can access list of NAV/BC related topics. To know more about the topic, you can write us on contact@allgrowtech.com
Facebook
Twitter
LinkedIn

By Harshit. T..

Author

Leave a comment

Your email address will not be published. Required fields are marked *