Export-NAVApplicationObject : $NavIde was not correctly set. Please assign the path to finsql.exe to $NavIde ($NavIde = path).
One step of convertering C/AL to AL is to import the fob in BC14 and then export it to text with the new syntax. This exporting can be achieved by using the Export-NAVApplicatieObject cmdlet. However I got an error I recognized but I didn’t know how to resolve it anymore. So I started Googling but couldn’t find the right answers quickly. That’s why I think this post could help also someone else or at least myself when I encounter this ‘issue’ ever again.
When executing the cmdlet you will get this error:
The term ‘Export-NAVApplicationObject’ is not recognized as the name of a cmdlet, function, script file, or operable program.
In order to fix this we need to load the module which contains this cmdlet. I loaded the module using the Import-Module cmdlet:
Import-Module 'C:\Program Files (x86)\Microsoft Dynamics 365 Business Central\140\RoleTailored Client\NavModelTools.ps1'
this results in an error however:
Export-NAVApplicationObject : $NavIde was not correctly set. Please assign the path to finsql.exe to $NavIde ($NavIde = path).
At line:1 char:1Export-NAVApplicationObject
CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Export-NAVApplicationObject

The cause is the loading of the incorrect module. Perform the following steps to resolve the issue:
- Close your PS (Powershell) environment
- Run the following Cmdlet:
Import-Module 'C:\Program Files (x86)\Microsoft Dynamics NAV\100\RoleTailored Client\Microsoft.Dynamics.Nav.Model.Tools.psd1'
Now the Export-NAVApplicationObject works without problems!
This was originally posted here.
*This post is locked for comments