When you have upgraded the application code, you can start upgrading the data.

For the Microsoft Dynamics NAV database upgrade, you use the same process as for upgrading from Microsoft Dynamics NAV 2009 to Microsoft Dynamics NAV 2013. You use data conversion tools provided with Microsoft Dynamics NAV 2013 R2 to convert the existing data with the old version’s table and field structure, so that it functions together with the new version’s table and field structure.

The following list describes the main steps of upgrading the data:

  1. Prepare the Microsoft Dynamics NAV 2013 data for the upgrade
    Step 1 covers tasks that involve the existing data in the objects from Microsoft Dynamics NAV 2013. You perform Step 1 tasks using the Microsoft Dynamics NAV 2013 database that has been converted by using the Microsoft Dynamics NAV 2013 R2 development environment.
  2. Upgrading the data to Microsoft Dynamics NAV 2013 R2
    Step 2 covers tasks that involve changes to the existing data with the new version objects. You perform Step 2 tasks using the Microsoft Dynamics NAV 2013 R2 development environment.

Step 1: Prepare the Microsoft Dynamics NAV 2013 data for the upgrade

The tasks in this part of the upgrade process involve upgrading the customer’s database from Microsoft Dynamics NAV 2013 to Microsoft Dynamics NAV 2013 R2.

Task 1: Open the customer’s existing database in the Microsoft Dynamics NAV 2013 R2 development environment

Follow the steps that are described in Converting a Microsoft Dynamics NAV 2013 Database.

Task 2: Import the objects for upgrade step 1

To import upgrade Step 1 objects, open Object Designer in the Microsoft Dynamics NAV 2013 R2 development environment and import the Upgrade7007010.1.fob file.

Important
When you upgrade a country-specific version, you must import the FOB file from the …\UpgradeToolKit\Local Objects folder. For example, if you are upgrading the Danish version of Microsoft Dynamics NAV, the name of the file is Upgrade700701.DK.1.fob.

Otherwise, import the fob file from the ..\UpgradeToolKit\Data Conversion Tools\701 folder on the Microsoft Dynamics NAV 2013 R2 media.

You will receive a message that the client cannot import the objects because there are objects already in the database with conflicting versions. Choose the OK button and then, in the Import Worksheet dialog box, choose Replace All.

Task 3: Data/Object changes before step 1

For each company in the database, make sure that there are no entries in the Item table where the Replenishment System field is set to None.

Important
In Microsoft Dynamics NAV 2013 R2, you can only change the company in the Microsoft Dynamics NAV Windows client. The Microsoft Dynamics NAV 2013 R2 development environment will run all objects in the context of the company that you last opened in the Microsoft Dynamics NAV Windows client.

Task 4: Data conversion

To perform the step 1 data conversion, follow these steps.

To perform step 1 data conversion

  1. In the Microsoft Dynamics NAV 2013 R2 development environment, open Object Designer, and then select page 104001 Upgrade - Old Version.

  2. Choose Run. This opens the page in the Microsoft Dynamics NAV Windows client.

  3. Choose Transfer Data.

    This runs codeunit 104045, Upgrade NAV 7 Step 1. Run this action one time for each company in your database.

    If any of the upgrade preconditions are not met, the Upgrade Error Log window will appear and list the errors. To correct any errors that may occur, select the error in the Upgrade Error Log window and choose Show. This will open the relevant page and, where it is possible, show the specific record with the error. Microsoft Dynamics NAV stores the last successfully processed table in the State Indicator table.

Task 5: Export permission sets and permissions

To preserve existing permissions sets and permissions, follow these steps.

To export permission sets and permissions

  1. In the Upgrade - Old Version window, choose Export Roles.

    This runs XMLport 104001 Import/Export Roles, which exports all permission sets to an XML file.

  2. In the request page for the XMLport, in the Direction field, choose Export, and then choose the OK button. Specify the location where you want to save the XML file, and save it as PermissionSets.xml.

  3. In the Upgrade - Old Version window, choose Export Permissions.

    This runs XMLport 104002 Import/Export Permissions, which exports all permissions to an XML file.

  4. In the request page for the XMLport, in the Direction field, choose Export, and then choose the OK button. Specify the location where you want to save the XML file, and save it as Permissions.xml.

Task 6: Delete objects

After task 4, the Delete Objects actions is made available. You must delete all objects in the database that are not tables. This task also deletes tables that belong to features that are not available in Microsoft Dynamics NAV 2013 R2.

When you choose the Delete Objects action, codeunit 104002 Delete Old Objects deletes all objects that are not tables.

In task 7, you replace these objects with the customized objects that you created as part of the merge process.

Task 7: Import all customized objects

Earlier in the upgrade process, you created a FOB file with customized Microsoft Dynamics NAV 2013 R2 objects, objects.fob. This FOB file contains all Microsoft Dynamics NAV 2013 R2 objects with your existing customizations applied. For more information, see Upgrading the Application Code.

Now, you can import those objects into the Microsoft Dynamics NAV 2013 R2 database. When the import starts, a warning appears that some objects with conflicting versions already exist in the database, or that no such conflict exists. Choose the OK button to open the Import Worksheet. Then, choose the Replace All button, and then choose the OK button to import the objects.

If any errors occur, you must correct the issues in the original, customized database, export the objects, and then repeat task 7.

Task 8: Compile the imported objects

When you have imported the customized objects, you must compile all objects.

Warning
If you receive complication errors for the customized objects, you must correct the issues and compile the objects before you move on to task 9.

This completes step 1 of the data upgrade.

Step 2: Upgrading the Data to Microsoft Dynamics NAV 2013 R2

Step 2 of the data upgrade involves changes to the existing data with the new version objects. You perform Step 2 tasks using the Microsoft Dynamics NAV 2013 R2 development environment.

Task 9: Import the objects for upgrade step 2

You must import the objects that are needed for step 2 of the data upgrade. These are stored in the Upgrade700701.2.fob file, which available on the Microsoft Dynamics NAV 2013 R2 media.

Important
When you upgrade a country-specific version, you must import the FOB file from the …\UpgradeToolKit\Local Objects folder. For example, if you are upgrading the Danish version of Microsoft Dynamics NAV, the name of the file is Upgrade700701.DK.2.fob.

Task 10: Data/Object changes before step 2

Before you perform step 2, you must make sure that the right language is set.

In the Microsoft Dynamics NAV 2013 R2 development environment, choose Tools, choose Language, and then select the language of the original customer database.

Task 11: Step 2 - Data conversion

The data conversion is company-specific, so you must repeat the following procedure for all companies in the database.

To convert data for a company

  1. Open the Microsoft Dynamics NAV Windows client, choose the company that you want to upgrade, and then close Microsoft Dynamics NAV Windows client.

  2. In the Microsoft Dynamics NAV 2013 R2 development environment, open Object Designer, and then select page 104002 Upgrade - New Version.

  3. Choose Run. This opens the page in the Microsoft Dynamics NAV Windows client.

  4. Choose Transfer Data.

    This runs codeunit 104048, Upgrade New Version. The codeunit does the following:

    1. Customer and vendor ledger entry numbers are added to sales and purchase tables to determine if the related sales and purchase invoices are paid.
      A Cust. Ledger Entry No. field is added to table 112 and table 114.
      A Vendor Ledger Entry No. field is added to table 122 and table 124.

    If any of the upgrade preconditions are not met, the Upgrade Error Log window will appear and list the errors. To correct any errors that may occur, select the error in the Upgrade Error Log window and choose Show. This will open the relevant page and, where it is possible, show the specific record with the error. Microsoft Dynamics NAV stores the last successfully processed table in the State Indicator table. To view the entries in the State Indicator table, choose Status, and then, in the Upgrade - New Version page, choose Status Indicator.

Task 12: Import upgraded permission sets and permissions

If the customer has changed the Read/Write/Modify/Delete/Execute settings for any of the standard permissions, or customized default permission sets in any way, you must merge these changes into the default permissions sets and permissions that are included in Microsoft Dynamics NAV 2013 R2.

Microsoft Dynamics NAV 2013 R2 includes updates to roles and permissions. Your local Microsoft country/region office may include two text files in the upgrade toolkit. If two such text files are not included, use XMLport 104001 Import/Export Roles and XMLport 104002 Import/Export Permissions to export the new default roles and permissions from the CRONUS International Ltd. demonstration database in Microsoft Dynamics NAV 2013 R2.

Now, you must merge the roles and permissions that you exported as part of task 5 with the Microsoft Dynamics NAV 2013 R2 roles and permissions.

To import the permission sets and permissions

  1. In Object Designer, choose page 9802 Permission Sets, and then choose Run.

  2. Delete all permission sets except the SUPER permission set.

  3. In Object Designer, choose page 104002 Upgrade - New Version, and then choose Run.

  4. To import the user roles from the merged PermissionSets.xml file, choose Import Roles.

  5. To import the permissions from the merged Permissions.xml file, choose Import Permissions.

This completes the data upgrade. Next, you remove the upgrade toolkit objects from the upgraded database.

Task 13: Delete the upgrade toolkit objects

You have upgraded the database to Microsoft Dynamics NAV 2013 R2. Now you can delete the upgrade toolkit objects from the database.

To delete the upgrade toolkit objects

  1. In Object Designer, choose page 104002 Upgrade - New Version, and then choose Run.

  2. Choose Mark/Delete Upgrade Toolkit.

    This removes all upgrade toolkit objects except tables.

  3. In Object Designer, choose Tables, set a field filter on the Version List field for tables that are marked as Upgrade Toolkit Table - marked for deletion, choose Edit, and then choose Delete.

The database is now fully upgraded and is ready for use. However, you may want to add the new client control add-ins that are included in Microsoft Dynamics NAV 2013 R2. These are not added by the upgrade process. The following client control add-ins are available from the Microsoft Dynamics NAV product media:

  • Microsoft.Dynamics.Nav.Client.BusinessChart
  • Microsoft.Dynamics.Nav.Client.PageReady
  • Microsoft.Dynamics.Nav.Client.PingPong
  • Microsoft.Dynamics.Nav.Client.VideoPlayer

You can add control add-ins in the Control Add-ins window in the Microsoft Dynamics NAV Windows client. For more information, see How to: Register a Windows Client Control Add-in.

See Also