HOWTO: Upgrade Zetadocs Customize and Integration Codeunits from Zetadocs for NAV v6.1 to v7.0 or later
ZTN4371
ID: ZTN4371
This Zetadocs technical note applies to:
- Zetadocs for NAV versions v5.0/v5.5/v6.0/v6.1
Summary
This article explains how to modify the Zetadocs Customize and Integration Codeunits as part of the upgrade from version 5.0 of Zetadocs for NAV or later to version 7.0 of Zetadocs for NAV or later.
More information
Version 7 of Zetadocs for NAV includes a restructuring of the code base, streamlining all modules and making it easier to support. This new architecture of Zetadocs for NAV requires changes to the Zetadocs Customization and Integration Codeunits when upgrading from earlier versions of Zetadocs. These changes are detailed below.
Please review the changes before the upgrade. You may not need to apply all the changes as it depends on the Zetadocs edition licenced:
Object |
Function |
Changes |
Edition |
Codeunit 9009962 Zetadocs-Send Customize |
WriteAdditionalEmbCommsToFile |
Major changes in the interface and in the code |
Delivery Plus |
Codeunit 9009963 Zetadocs-Send Integration |
GetOutputFileName |
Bug fixes and improvements, changes in code |
Delivery |
Codeunit 9009964 Zetadocs-Capture Customize |
GetAutoLink |
Bug fixes and improvements, changes in code |
Capture Plus |
GetLinkDisplayString |
Bug fixes and improvements, changes in code |
||
PostArchive |
Major changes in the code |
||
Codeunit 9009965 Zetadocs-Capture Integration |
No changes |
No changes |
Capture |
Codeunit 9041223 Zetadocs-Save & Send Integration |
No changes |
No changes |
No licence |
Table1. List of objects and functions changed for version 7.0 of Zetadocs for NAV and later
Please follow the version 7.0 of Zetadocs for NAV steps to upgrade the Zetadocs objects in your Microsoft Dynamics NAV system. The instructions given here are for NAV 2013 R2 and version 7.0 of Zetadocs for NAV, for other versions you must pick the file that’s appropriate for the version of NAV you are using (similar advice applies to version 7.1 of Zetadocs for NAV or later):
- Zetadocs does not create a backup of your Dynamics NAV Objects, please before continuing with the installation please make sure that you have a backup of your customized Codeunits.
Note: although it is not required, it is easier to upgrade the objects using a compare tool such as WinMerge.
- Check your licence. You only need to follow the steps in this technote if your licence allows you to do it (according with the table 1) and you have customized code in your codeunits. Otherwise it is recommended to import the codeunit shipped in the product.
- Export customized Codeunits as text. Create a new folder in the desktop named ‘ZetadocsUpgrade7.0’. Open the Object Designer in your development environment. Select Codeunits and apply the following ID filter: ‘9009962..9009965|9041211’. Select objects one by one exporting them as text and saving them in the folder that you have already created ‘ZetadocsUpgrade7.0’.
Note: You may need development licence to export objects in text format.
- Open ‘ZetadocsUpgrade7.0’ folder and create a new folder called ‘ZTN4371’. Please download the zip file related with this technote and extract the contents in the ‘ZTN4371’ folder.
Note: Some of the changes requires special attention because there are two possible options depending on your Dynamics NAV version and you need to choose what applies to your NAV system.
Image 1. Differences between versions in NAV. Left image: Local version with forms . Right image: Version 7.0 of Zetadocs for NAV.
- Compare the changes for each of the exported codeunits with the corresponding one in the downloaded folder.
- For example, follow these steps to upgrade the Zetadocs-Send Customize Codeunit:
- Compare the Zetadocs-Send Customize Codeunit exported from your system with the one shipped in this technote.
- According with the table1, there are major changes in the code and in the interface.
- Changes in the interface:
The old interface (previous to version 7.0 of Zetadocs for NAV) |
The new interface (from version 7.0 of Zetadocs for NAV) |
PROCEDURE WriteAdditionalEmbCommsToFile@1000000000(Record@1000000003 : RecordID;ZdSendResult@1000000002 : Record 9009968;ZdSendSettings@1000000001 : Record 9009975;VAR ZdAction@1000000000 : 'Continue,Skip,Error';VAR file@1000000004 : Automation "{B87DBB77-029B-40D7-93CE-912328221835} 1.2:{61F31517-7C1D-45FD-979F-9B7BF2CE736A}:Unknown Automation Server.ZdEmbFile"); |
PROCEDURE WriteAdditionalEmbCommsToFile@1000000000(Record@1000000003 : RecordID;ZdSendResult@1000000002 : Record 9009968;ZdSendSettings@1000000001 : Record 9009975;VAR ZdAction@1000000000 : 'Continue,Skip,Error';VAR file@1000000004 : Codeunit 9009983); |
Please modify the interface of the function so that the result Codeunit has the changes for the version 7.0 (in green). Please save the result Codeunit.
- Changes in the code. Local variables:
Image 2. Local variable differences. Left image: Version 6.1 of Zetadocs for NAV or earlier. Right image: Version 7.0 of Zetadocs for NAV.
If you are using additional variables, please be sure that you modify them correctly. Please verify that the result Codeunit has the changes for the version 7.0. Please save the result Codeunit.
- Changes in the code. Body of the function:
You need to change the creation of the object:
Image 3. Create and initialize the main object. Left image: Version 6.1 of Zetadocs for NAV or earlier. Right image: Version 7.0 of Zetadocs for NAV.
Populate the MetadataToMatch temporary table with the information you may want to search and run your query:
Image 4. Prepare and run your query. Left image: Version 6.1 of Zetadocs for NAV or earlier. Right image: version 7.0 of Zetadocs for NAV.
Note: There is a new way of searching documents for further information on how to use the seach function, please visit the following technote ZTN4377.
Once again, please compare carefully what is changed and modify the body of the function so the result Codeunit has the changes for the version 7.0. Please save the result Codeunit.
- Update version number and add new comments.
Please append the version number at the end of the Version list. ZDX7.0.380 (or ZDX7.1.506) if you are using Zetadocs Express and EQ7.0.380 (or EQ7.1.506) if you are using Zetadocs for NAV.
- Please follow the previous step for all of the objects in the table 1.
- Once the changes in all the CodeUnits are done please import the result Codeunits in your NAV system and compile the objects.
- Please verify that the version number of each object has been updated.
- It is important that you test your system before finishing the upgrade process to verify that it is working properly.
Note: Some of the errors related to an incomplete upgrade of the objects are thrown while testing your application.
References
Zetadocs for NAV Essentials Installation Guide
Last updated: 23rd October 2015 (JV/GC)