HOWTO: Archive and Retrieve Related Documents with Journal Lines
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 the General Ledger Entries page.
Other related technotes are available:
ZTN4282: HOWTO Archive and Retrieve Related Documents with Jobs for Sales Invoices and Posted Sales Invoices
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:
- Step1: Create a page to allocate the Zetetadocs FactBox for the Journal Lines
- Step 2: Add the Zetadocs Document FactBox to the page
- Step 3: Link the Zetadocs Document FactBox to the General Ledger Entries page
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: Create a page to allocate the Zetetadocs FactBox for the Journal Lines
Adding the Zetadocs FactBox to the General Ledger Entries (Page 20) requires a new page to allocate the Zetadocs FactBox and link the page to the corresponding entry.
- Create a new page in the NAV Object Designer as follows:
- Select the General FastTab and click next.
- Select the required fields. In this example the following fields are selected: Posting Date, Document Type, Document No., G/L Account No., Description, Gen. Posting Type, Gen. Bus. Posting Group, Gen. Prod. Posting Group, Amount, Bal. Account Type, Bal. Account No. and Entry No.
Note: Steps 4 and 5 are only needed to add the Document FactBox with the Interface ModificationTool, otherwise please skip them.
- Add a FactBox area to the page:
Note: the FactBoxArea does not need to be indented.
- Add a new action container:
- View> Page Actions.
- Change the SubType to ActionItems, leave the defaults.
- Close the Page Action Designer.
- Save and compile your Page. In this example, the ID is 50001 and the Name is ZD-General Ledger Entry FB.
- Close the page.
- Go back to the Object Designer in NAV and export the page that you have created.
Step 2: Add the Zetadocs Document FactBox to the page
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 ZD-General Ledger Entry FB in plain text from NAV.
- Make a backup of the NAV Object exported.
- Run the Zetadocs Interface Modification Tool for the ZD-General Ledger Entry FB, or apply the manual steps.
- Import and compile the ZD-General Ledger Entry FB (modified) object in NAV.
When the steps above have been completed the Zetadocs FactBox appears in the ZD-General Ledger Entry FB page.
Step 3: Link the Zetadocs Document FactBox to the General Ledger Entries page
At this point, there should be a new page created that includes the Zetadocs FactBox but it is not linked to the General Ledger Entries page yet, please follow the steps to make it:
- Open the Design view of the General Ledger Entries page.
- Open the Code Window. View> C/AL Code.
- Scroll down to the Description – OnDrillDown() function.
- Add the following code:
Where 50001 is the ID of the page created in the step 2.
- Close the Code Window.
- Save and Compile the page.
The next time that the General Ledger Entries page is open, it will display the drilldown button (…) in the description field. By clicking it, it will display the ZD-General Ledger Entry FB page with the Zetadocs FactBox on it.
Last updated: 27th January 2015 (JV/NT/GC/DH)
Keywords: record mappings