Why Export-NAVApplicationObject can fail

Today I’ve got a strange error when tried to create the .navx file.

Windows PowerShell

PS C:\> Compare-NAVApplicationObject –OriginalPath C:\Solution\ORIGINAL\*.txt -ModifiedPath C:\Solution\MODIFIED\*.txt -DeltaPath C:\Solution\DELTA

Processed 14 objects:
Inserted 0 objects
Deleted 1 objects
Changed 4 objects
Identical 9 objects
Failed 1 objects

This was strange, cos my solution had only new objects. No log, nothing. All objects compiled.

After some time of the investigation, I tried old fashioned way: export in .txt and import as txt.
And what I’ve got: ERROR ‘BEGIN Expected’.

So the reason was that in some function I had a variable called ‘ARRAY’. I know that this was a bad pattern, but anyway…
I changed the name of variable and woalya! No errors.

That was strange behaviour. So take in mind once again, don’t call variables with system names.

Share Post:

Leave a Reply

About Me

DMITRY KATSON

A Microsoft MVP, Business Central architect and a project manager, blogger and a speaker, husband and a twice a father. With more than 15 years in business, I went from developer to company owner. Having a great team, still love to put my hands on code and create AI powered Business Central Apps that just works.

Follow Me

Recent Posts

Tags