Tuesday, April 7, 2020

Upgrade NAV 2018 to Business Central

Hi Readers, 

Since we are quickly moving to Dynamics 365 Business Central, there are many projects that are still working on Microsoft NAV 2018 and we need to migrate it to Business Central. 

When it comes to NAV - NAV migration, we do the export and merge operations but since Business Central doe snot support C/AL and has a new language AL, we need to perform certain steps to perform the upgrade. 

Today, we will discuss how that can be achieved. 


Prerequisites: 

1. VS Code
2. Business Central Workspace


3. Compile all NAV Objects
4. Upgrade the NAV Objects to be compatible with Business Central (This step is not required for new setup)
5. Exported NAV Objects 
Please note, it is advisable to export NAV Objects as .txt and Object wise.

Steps to perform update:
1. Export Business Central Objects using the following command in Administration Shell. 

Base Objects:

finsql.exe Command=ExportToNewSyntax, File=<filename.txt>, Database="<databasename>", ServerName=<servername> ,Filter=Type=table;ID=<tableID>

Modified Objects:

Command=ExportToNewSyntax, File=<filename.txt>, Database="<databasename>", ServerName=<servername> ,Filter=Type=table;ID=<tableID>

2. Go to \Program Files(x86)\Microsoft Dynamics 365 Business Central\150\RoleTailored Client and locate txt2al.exe conversion tool. 

By this time, you will have your NAV objects as well as Business Central Objects. 

3. Create .delta file using Compare-NAVAppicationObject in powershell. 

Example:

Compare-NAVApplicationObject -OriginalPath "C:\PageWith2Controls.txt" -ModifiedPath
"C:\PageWith3Controls.txt" -ExportToNewSyntax

Note: Step 3 is not a mandatory step for new projects. You can consider the exported NAV Objects.

4. Run this tool and execute the following command:

txt2al --source --target --rename --type --extensionStartId --injectDotNetAddIns --dotNetAddInsPackage --dotNetTypePrefix --translationFormat --addLegacyTranslationInfo

where, 
          source - path of the directory of .delta file/.txt NAV Objects 
          target - path of the directory for the converted AL file to be placed.
          rename - rename of oebject file if the file name already exists
          type - the type of object (Table, Page, Codeunit, Report and others)
          
other parameters are not mandatory. 

Example:
txt2al –source=”D:\NAV2018\Modified” –target=”D:\D365BC\AL” –extensionStartId=50000

I hope this post was brief and helpful. You can let me know in the comment section below. 
You can write me at jyotsnaoberainav@gmail.com 

To get any services, visit jyotsnanav.wordpress.com

Thank you!

        

No comments:

Post a Comment