› Dynamics NAV › Upgradation of Application Code in Microsoft Dynamics NAV

Upgradation of Application Code in Microsoft Dynamics NAV

 Tina Menezes   2 Comments

Introduction:

Upgradation of objects/data in NAV have to be done after the application has been upgraded to the latest version. Code from different versions of NAV application have to be merged to upgrade the data. This process of merging objects in NAV between different versions is known as code/data upgradation.

Pre-requisite:

  1. Microsoft Dynamics NAV
  2. Windows PowerShell ISE
  3. The following objects have to be exported and saved:
  4. All Standard objects of the previous version of Microsoft Dynamics NAV in .txt format.
  5. All objects of the modified database of Microsoft Dynamics NAV in .txt format.
  6. All Standard objects of the higher version of Microsoft Dynamics NAV to which the objects have to be migrated in .txt format.

After all these steps are performed, install the latest version of Microsoft Dynamics NAV to which objects need to be migrated.

Purpose:

The main purpose of Data Upgradation is to move customizations done in any previous version of Microsoft Dynamics NAV to the new Higher version of Microsoft Dynamics NAV database.

Steps:

  1. Create 4 folders i.e. Original, Modified, Result and Target in the system.
  2. Fig 1: Create four folders as specified above
  3. Save the backup of ‘All Standard objects of the previous version of Microsoft Dynamics NAV in .txt format’ in the Original
  4. Save the backup of ‘All objects of the modified database of Microsoft Dynamics NAV in .txt format’ in the Result
  5. Save the backup of ‘All Standard objects of the higher version of Microsoft Dynamics NAV to which the objects have to be migrated in .txt format’ in the Target
  6. Open Windows PowerShell ISE as administrator. Run the following commands in it and refresh PowerShell.
  7. Import-Module "C:\Program Files\Microsoft Dynamics NAV\100\Service\NavAdminTool.ps1"
    
    Import-Module "C:\Program Files (x86)\Microsoft Dynamics NAV\100\RoleTailored Client\NavModelTools.ps1"
    

    These commands help to load Dynamics NAV Cmdlets into the runspace.

    Fig 2: Windows Powershell ISE commands to load Microsoft Dynamics NAV Cmdlets
  8. In Windows Powershell ISE, go to Merge-NAVApplicationObject Cmdlet and enter the path of the four folders created initially i.e. Original, Modified, Result and Target folder.
  9. Fig 3: Merge-NAVApplicationObject Cmdlet

    Fig 4: Merge-NAVApplicationObject Cmdlet gives details of the merge process
  10. After running the Merge-NAVApplicationObject Cmdlet the Result folder will automatically be filled with all objects in .txt format. Each object file will be stored separately.
  11. Fig 5: Result folder contents
  12. Now, in order to create one .txt file by joining all the .txt files present in the Result folder, navigate to Join-NAVApplicationObjectFile Cmdlet in Windows PowerShell ISE. Enter the path of the Result folder as the Source and enter a name of the Destination as ‘Merge.txt’
  13. Fig 6: Join-NAVApplicationObjectFile Cmdlet

    This will create Merge.txt file in the specified location.

    Fig 7: Merge.txt file created
  14. Now import the txt file into the new database of the Higher version of Microsoft Dynamics NAV. Errors if existing will be displayed during the import process and the import process will stop there. The errors have to then be rectified and the Upgradation process has to be repeated again from step 6. After all errors are rectified and conflicts are resolved, the Merge.txt will be successfully imported.
  15. Now, compile all the objects of the new database. You will have a new database with a fully application and data/code including all the modifications and customizations.

Conclusion:

Using the above process, modifications and customizations done in the previous version of Microsoft Dynamics NAV can be successfully migrated to the Higher version of Microsoft Dynamics NAV.

 


Liked it? Share it.

2 thoughts on “Upgradation of Application Code in Microsoft Dynamics NAV”

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload the CAPTCHA.