HOWTO: Archive and Retrieve Related Documents with Jobs for Sales Invoices and Posted Sales Invoices
This Zetadocs technical note applies to:
- Version 5 and above of Zetadocs for Microsoft Dynamics NAV
This technote describes how to add the Zetadocs Documents FactBox to archive and retrieve documents to Sales Invoices and Posted Sales Invoices.
Other related technotes are available:
ZTN4386: HOWTO Archive and Retrieve Related Documents with Journal Lines
ZTN4387-HOWTO Archive and Retrieve Related Documents with Service Quotes
Any other additional scenarios may require Equisys professional services and should be discussed separately.
The outline of this technote contains the following topics assuming that the reader is familiar with the NAV Development environment and has a general understanding of the NAV posting path:
- Step 1: Add the Zetadocs Document FactBox to Job Card, Sales Invoice and Posted Sales Invoice pages
- Step 2: Add mappings to see additional documents related to Jobs in Sales and Sales Invoices
Zetadocs for NAV has the ability to search for documents archived against a particular NAV record and display the results in the documents FactBox. By default this maps records in the Sales and Purchase areas of NAV. Through configuration, it also has the ability to search for documents archived against related NAV records. This is configured in the Zetadocs Record Mapping Header and Zetadocs Record Mapping Line tables. These tables contain a collection of mappings that tell the Zetadocs search code which records are related and how. The only requirement is that there is enough data in the NAV table to be able to find the related records.
When configuring the Zetadocs Mappings you will need to know the table numbers that you are referring to and the field numbers containing the data which allows you to get to the related records.
Step 1: Add the Zetadocs Document FactBox to Job Card, Sales Invoice and Posted Sales Invoice pages
Zetadocs requires several existing NAV interfaces to be modified to add Zetadocs functionality, to make this process quicker and easier we have provided the Zetadocs Interface Modification tool. This can update NAV v5.x, v6.x, 7.x and 8.0 objects so that they can integrate with Zetadocs, the tool will inform you if there are any issues, for example if the objects have too extensive a set of existing customizations, in which case manual steps are available. Please consult the Zetadocs Essentials Installation Guide if you require further information.
Please follow these steps:
- Export the Job Card, Sales Invoice and Posted Sales Invoice pages in plain text from NAV.
- Make a backup of the NAV Objects exported.
- Run the Zetadocs Interface Modification Tool for the Job Card, Sales Invoice and Posted Sales Invoice pages, or apply the manual steps.
- Import and compile the Job Card (modified), Sales Invoice (modified) and Posted Sales Invoice (modified) objects in NAV.
When the steps above have been completed the Zetadocs FactBox appears in the Job Card, Sales Invoice and Posted Sales Invoice pages.
Step 2: Add mappings to see additional documents related to Jobs in Sales and Sales Invoices
This example adds the required rules to get documents attached to a Job table from Sales Line or Sales Invoice Line. It also includes the rules to display documents attached to the lines in Sales Header or Sales Invoice Header records.Please note that the principle can be used to add similar functionality to areas other than sales and purchase posting routines throughout NAV.
To create the Zetadocs Record Mapping please follow these steps:
- Open the Object Designer in NAV.
- Run the Table 9041213 – Zetadocs Record Mappings Header and create a new rule:
In this example there are 5 new mappings, please note that you should create new mappings starting on the next free Mapping ID that you have available.
- Run the Table 9041214 – Zetadocs Record Mappings Line and relate the rule with its keys:
There are two records created for the same rules related to the Mapping ID = 1 and Mapping ID = 2, and one record for each of the other rules. Please fill the table with the values provided in the Zetadocs Mappings Line image above. Please note that Mappings IDs may be different in your system and they need to match the rules created in the previous step.
- Close the tables.
- Open the Posted Sales Invoice page to test your system.
After adding the rules above with its key values, the Posted Sales Invoice page searches for:
- Documents archived to the Sales Invoice and to each Sales Invoices Lines.
- Documents archived to the Posted Sales Invoices and to each Posted Sales Invoice Line.
- Documents archived to each Job in both the Sales Invoices Lines and the Posted Sales Invoice Lines.
Last updated: 27th January 2015 (MW/JV/NT/GC/DH)
Keywords: record mappings