Identifying Customized Objects

When working with code upgrade it is important to analyze and process code changes by comparing and evaluating three separate versions of the Microsoft Dynamics NAV database.

Version Description

Old Base Version

This is a standard version of the Microsoft Dynamics NAV 2009 database.

Old Custom Version

This is the old base database plus the customer's changes and add-on solutions.

New Base Version

This is a standard version of the Microsoft Dynamics NAV 2013 database.

After merging customizations into the New Base Version you will have a New Custom Version, which is the objective of the code upgrade. The product of the code upgrade is a .fob file that contains all Microsoft Dynamics NAV 2013 objects (including customizations), which you will use during the data upgrade. Customers can continue to work with the Microsoft Dynamics NAV 2009 database (the old custom version) while you upgrade the code by using a copy of their database. However, we recommend that you avoid making any additional customizations to the old custom version while you work on the code upgrade.

Start by identifying any customer-specific changes that have been made to the customer’s old custom version, then implement those changes in the new base version. To identify the customizations that the customer has made, you must have an old base version to compare with the old custom version.

The following procedures show how to compare the objects in the customer’s old custom version with the old base version, and then implement the necessary changes in the new base version. The procedures assume that you already have Microsoft Dynamics NAV 2009 installed. The procedures walk you through the two aspects of upgrade: preparing all objects (other than reports) for merging, and preparing reports for upgrade.

After you complete the comparison, you are ready to start analyzing and merging changes.

You must treat reports separately, as they will undergo additional transformation in Microsoft Dynamics NAV 2013. Therefore, to be able to compare Microsoft Dynamics NAV 2009 reports with Microsoft Dynamics NAV 2013 reports, Microsoft Dynamics NAV 2009 reports should be upgraded using the Microsoft Dynamics NAV 2013 Development Environment.

In addition, you have to run the old Microsoft Dynamics NAV 2009 objects through the TextFormatUpgrade2013.exe tool to make sure they do not have references to forms either in code or in properties, to minimize the number of differences when you compare the two sets of objects.

To begin, create three folders on the computer and name them as follows:

  • OldBaseVersion

  • OldCustomVersion

  • NewBaseVersion

When you have completed the identification process that is described in the following procedures, you should have the following folder structure.

OldBaseVersion
    OldBaseVersion.txt
    OldBaseVersion_Reports.txt
    Converted
        OldBaseVersion.txt
        OldBaseVersion_Reports.txt
OldCustomVersion
    OldCustomVersion.txt
    OldCustomVersion_Reports.txt
    Converted
        OldCustomVersion.txt
        OldCustomVersion_Reports.txt
NewBaseVersion
    NewBaseVersion.txt
    NewBaseVersion_Reports.txt

To identify customer-specific changes

To identify customer-specific changes, you need to compare the objects in the customer's old custom version with the old base version.

Part 1: Export all old objects except reports

Complete the following series of actions for the old base version of the Microsoft Dynamics NAV 2009 database.

Identifying custom objects - part 1

  1. Open the database using the Microsoft Dynamics NAV 2009 Classic client.

  2. Delete all dataports and forms from the database.

  3. Export all remaining objects in .txt format into the OldBaseVersion folder. Do not include system tables and reports. Name the file OldBaseVersion.txt.

  4. Repeat steps 1 through 3 for the old custom version of the Microsoft Dynamics NAV 2009 database. Name the file OldCustomVersion.txt.

Part 2: Export reports

Complete the following series of actions for the old base version of the Microsoft Dynamics NAV 2009.

  1. Open the old base version of the Microsoft Dynamics NAV 2009 database using the Microsoft Dynamics NAV 2009 Classic client.

  2. Export all report objects in .txt format into the OldBaseVersion folder. Name the file OldBaseVersion_Reports.txt.

  3. Repeat steps 1 and 2 for the old custom version of the Microsoft Dynamics NAV 2009 database. Name the file OldCustomVersion_Reports.txt.

Part 3: Run text format upgrade for exported objects

  • Run the TextFormatUpgrade2013.exe tool on the contents of the OldBaseVersion folder and the OldCustomVersion folder to update all references to forms so that they are now references to pages in all objects. For more information about the TextFormatUpgrade2013 tool, see TextFormatUpgrade2013 Tool.

The TextFormatUpgrade2013.exe tool saves the objects in a subdirectory of the original folder:

C:\OldBaseVersion\Converted\OldBaseVersion.txt

C:\OldBaseVersion\Converted\OldBaseVersion_Reports.txt

-or-

C:\OldCustomVersion\Converted\OldCustomVersion.txt

C:\OldCustomVersion\Converted\OldCustomVersion_Reports.txt

To prepare Microsoft Dynamics NAV 2009 report objects for comparison

Report objects in Microsoft Dynamics NAV 2009 can have both client report definition (RDLC) report layout and classic layout, as well as request forms. In Microsoft Dynamics NAV 2013 they can only have RDLC layout, so the classic layout and request form will be removed during upgrade. In addition, the report’s dataset structure will be upgraded to the new layout.

To be able to compare Microsoft Dynamics NAV 2009 and Microsoft Dynamics NAV 2013 reports and to identify customizations, you have to import Microsoft Dynamics NAV 2009 reports into the Microsoft Dynamics NAV 2013 Development Environment, compile and upgrade them there, and then export them again in .txt format.

Complete the following series of actions for the old base version objects.

  1. Uninstall Microsoft Dynamics NAV 2009. The Microsoft Dynamics NAV 2009 database will not be deleted.

  2. Install Microsoft Dynamics NAV 2013. Choose the Developer Option.

    Make sure the Compatibility Level of the Microsoft Dynamics NAV 2009 database is correct.

    For SQL Server 2008 or SQL Server 2008 R2, verify that the compatibility level of the database is set to 100. For SQL Server 2012, set the compatibility level to 110.

    To do this, start Microsoft SQL Server Management Studio and connect to an instance of SQL Server that the Microsoft Dynamics NAV database is attached to. Right-click the database and select Properties. In the Database Properties window, select the Options page, and then verify that the Compatibility Level is set correctly.

  3. Open the old base version of the Microsoft Dynamics NAV 2009 database using the Microsoft Dynamics NAV 2013 Development Environment. Remember that the database does not contain objects of type form and dataport. Agree to convert the database.

  4. Import and compile converted OldBaseVersion_Reports.txt objects.

    Some reports may not compile because they contain obsolete methods or properties. If these reports are customized, you have to remove the obsolete methods and properties directly in the .txt files and then import them into Microsoft Dynamics NAV 2013 again.

  5. Select all the reports, and on the Tools menu, choose Upgrade Reports. The reports that did not compile will not be upgraded.

    For more information about how to upgrade reports, see How to: Upgrade Reports.

  6. Export the upgraded reports to the OldBaseVersion folder in .txt format into the following folder:

    C:\OldBaseVersion\Converted\OldBaseVersion_Reports.txt

    Accept the message that asks if you want to overwrite the file that is already there.

  7. Repeat steps 3 through 6 for report objects stored in the OldCustomVersion folder using the old custom version database.

These reports are now ready for comparison.

To prepare new base version objects

  1. Open the new base version database using the Microsoft Dynamics NAV 2013 Development Environment.

  2. Export all objects in .txt format into the NewBaseVersion folder. Do not include system tables and reports. Name the file NewBaseVersion.txt.

  3. Export all report objects in .txt format into the NewBaseVersion folder. Name the file NewBaseVersion_Reports.txt.

For each version, split the converted .txt files into single objects and review them using a file comparison tool. Delete the objects that are identical and not customized.

You can now start comparing the converted objects.

See Also

Concepts

Upgrading to Microsoft Dynamics NAV 2013