In this post I described a way to deal with Extension Files Info in NAV AL (Business Central).
Now I decided to create a small module that will help you manage the Extensions and Ids.
Besides what I showed in the first post, I added to the module an extra feature: now you have the possibility to get the free Ids: if for example you have 2 table extensions with Ids 50251 and 50254, the free Ids are considered the ones not used within the ones used, so in this example: 50252 and 50253. You can do this by specifying and extra parameter to the function.
Example:
–> Sample AL files in a folder:
–> Get Information about the extensions:
$Folder = 'C:\ALExtensionIdsSample\Folder 2' $Files = @() $Files += Get-ChildItem $Folder -Filter '*.al' Get-ALExtensionFilesInfo -ALExtensionFiles $Files
Get-ALExtensionFilesInfo -ALExtensionFiles $Files -GetFreeIds
The module can be installed from the Powershell Gallery by using the following commands:
$ModuleName = "NavALExtensionFilesInfo" Get-Module -Name $ModuleName -ListAvailable | Uninstall-Module Install-Module $ModuleName -Force -Confirm:$false
Run Powershell as Administrator while installing !
After the module is installed (only once) you can use the function “Get-ALExtensionFilesInfo” in any powershell session (In VS Code if you have installed the powershell extension or in Powershell ISE). You can also use the help cmdlet to see information about this function and examples of how to use it:
Get-Help Get-ALExtensionFilesInfo -Full
This module has also a github repository. In case you discover any bugs or you have ideas of extra features, you can open an issue here:
https://github.com/andreilungu/NavALExtensionFilesInfo