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
When you use extension codeunits in Nav or BC it’s possible to publish a codeunit function in a page webservice which is exposed as Soap webservice. Recently we migrated a customer from Nav 2017 to BC14. After fixing the custom objects the page webservice didn’t show the codeunit method. After checking everything I found out that an important property needs to be set in the codeunit: