Workaround to “Import As” when importing .NAVDATA in Microsoft Dynamics NAV 2015+

Starting with Microsoft Dynamics NAV 2015 we are now able to export and import company data using NAV client. It is a very handy way of transferring company data between different databases provided they have the same table definition making it easier to update Test sandboxes with Live data.

Sometimes, though, you would want to import a fresh live company under a different name. Unfortunately there is no such option out of the box. Question is – is there any way to achieve that? I would like to share my experience and findings on that issue.

If you open .navdata file in a notepad you will immediately notice that there is a list of companies right there. I have spent some time on mapping the header of the file and here is what I have found:

NAV

Playing around with different .navdata exports I have noticed that all of them contained a static header part (first blue frame on the top) of the map.

As you can see, the number of companies (red 03) is then followed by 3 bytes of what appears to be extra options used during the export. Then you can see the length of the ‘CRONUS UK Ltd.’ (0e) followed by the company name itself. Then 2 more sets of company name length and company name values.

Having the map you can change the company name manually using any Hex Editor software available. For an automated way you can create a simple function in NAV to allow the user to specify the .navdata file to edit, present the user with the list of companies in the file and then recreate the .navdata file with new company names in it.

I would just like to add that the .navdata file contains all the company data and binary data (if you export with application) so please be careful when editing the file manually.

Leave a Reply