Equisys technical notes

Technical guidance, explanations and fixes for our products

HOWTO: Archive and Retrieve Related Documents with Service Quotes and Service Orders

Print

ZTN4387

ID: ZTN4387

This Zetadocs technical note applies to:

  • Version 5 and above of Zetadocs for Microsoft Dynamics NAV

Summary

This technote describes how to enable related documents to be archived and retrieved with Service Quotes and Service Orders in NAV.

Other related technotes are available:

ZTN4386: HOWTO Archive and Retrieve Related Documents with Journal Lines

ZTN4282: HOWTO Archive and Retrieve Related Documents with Jobs for Sales Invoices and Posted Sales Invoices.

Any other additional scenarios may require Equisys professional services and should be discussed separately.

More information

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:

  • Introduction
  • Steps to allow archiving and retrieval of related documents with Service Quotes and Service Orders
    • Step 1: Add the FactBox with Metadata to the Service Quotes and Service Orders pages
    • Step 2: Add the FactBox to Service Item Lines
    • Step 3: Enable documents to be retrieved in the FactBox:
      • Step 3a: Relate Service Item Lines to Service Orders
      • Step 3b:Relate Service Quotes to Service Orders

Introduction

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.

Step 1: Add the FactBox with Metadata to Service Orders and Service Quotes 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:

  1. Export the Service Quote and the Service Order pages in plain text from NAV.
  2. Make a backup of the NAV Objects exported.
  3. Run the Zetadocs Interface Modification Tool for the Service Quote and the Service Order, or apply the manual steps.
  4. Import and compile the Service Order (modified) and Service Quotes (modified) objects in NAV.

When the steps above have been completed the Zetadocs FactBox appears in the Service Quote and in the Service Order pages.

There is an optional step to add metadata information to the document archived using Zetadocs. Please visit the ZTN4288 technote for further information. If you intend to include additional metadata to your Service Header Table, please run the Zetadocs Metadata Mappings table and fill it with the records displayed in the image below:

The image below displays the differences between a document archived without metadata (left) and a document archived after applying the Zetadocs Metadata Mappings in the previous step (right).

                                                 

Step 2: Add the FactBox to Service Item Lines

This section describes how to create a new Service Item Lines page that is opened when drilling down in a specific Service Item Line and how to add the Zetadocs FactBox to it.

  1. Create a new page in the NAV Object Designer as follows:
  2. Select the General FastTab and click next.
  3. Select the required fields. In this example the following fields are selected: Line No. Service Item No., Service Item Group Code, Item No., Serial No., Description and Vendor No.; Click on finish.
  4. Note: Steps 4 and 5 are only needed to add the Document FactBox with the Interface Modification Tool, otherwise please skip them.

  5. Add a FactBox area to the page:
  6. Note: the FactBoxArea does not need to be indented.

  7. Add a new action container:
    1. View> Page Actions.
    2. Change the SubType to ActionItems, leave the defaults.
    3. Close the Page Action Designer.
  8. Save and compile your page. In this example, the ID is 50000 and the Name is ZD-Service Item Line FB.
  9. Close the page.
  10. Go back to the Object Designer view in NAV and export the page that you have created.
  11. Add the Zetadocs FactBox according to the instructions at the beginning of this technote.

At this point, there should be a new page created that includes the Zetadocs FactBox. Although the Service Order has Service Item Lines, they are not directly linked to the Service Order, they use the Service Order Subform page instead. The next step is to link the ZD-Service Item Line FB page to the Service Order Subform, please follow the steps to do it:

  1. Open the Design view of the Service Order Subform page.
  2. Open the Code Window. View> C/AL Code.
  3. Scroll down to the Description – OnDrillDown() function.
  4. Add the following code:
  5. PAGE.RUNMODAL(50000, Rec);

    Where 50000 is the ID of the page created in the previous section.

  6. Close the Code Window.
  7. Save and Compile the page.

The next time that the Service Order page is open, it will display the drilldown button (…) in the description field. By clicking it, it will display the ZD-Service Item Line FB page with the Zetadocs FactBox on it.

Step 3: Enable documents to be retrieved in the FactBox

The fact that there are two FactBoxes one in the Service Order and another one in the Service Item Line does not mean that documents are automatically displayed in each other FactBoxes. Step 3a explains how to see the documents attached to the Service Item Line in the Service Order. Step 3b shows how to see related documents attached to a Service Quote in the Service Order.

Step 3a: Relate Service Item Lines to Service Orders

The reader should understand that each record in NAV contains a key to uniquely identify it. It is normally composed of one or more fields.

To create the Zetadocs Record Mapping please follow these steps:

  1. Open the Object Designer in NAV.
  2. Run the Table 9041213 – Zetadocs Record Mappings Header and create a new rule:
  3. Type a new Mapping ID, the next available in this example is 53. Then fill the table with the values displayed in the image above.

  4. Run the Table 9041214 – Zetadocs Record Mappings Line and relate the rule with its keys:
  5. There are two records created for the same rule (Mapping ID = 53), please fill the table with the values provided in the Zetadocs Mappings Line image above.

  6. Close the tables and open the Service Order.

After adding the rule above with its key values, Zetadocs searches for all documents archived to the Service Item Line and displays them in the Service Order page.

Step 3b: Relate Service Quotes to Service Orders

This scenario explains how to add the documents attached to the Service Quote to the Service Order Zetadocs FactBox

To create the Zetadocs Record Mapping please follow the steps:

  1. Open the Object Designer in NAV
  2. Run the Table 9041213 – Zetadocs Record Mappings Header and create a new rule:
  3. Type a new Mapping ID, the next available in this example is 54. Then fill the values with the same provided in the image above.

  4. Run the Table 9041214 – Zetadocs Record Mappings Line and relate the rule with its keys:
  5. There are two records created for the same rule (Mappig ID = 54), please fill the table with the values in provided in the Zetadocs Mappings Line image above.

  6. Close the tables and open the Service Order.

After adding the rules above Zetadocs will search for documents archived against the Service Quote and displays them in the Service Order page.

Last updated: 27th January 2015 (JV/NT/GC/DH) 

Keywords: record mappings

EquisysLogo

Recent news

It’s that time of year again. Directions EMEA is right around the corner. This year, it takes place at the Austria Center in Vienna, between 9-11 October. Traditionally, Directions NA would take ...

We are delighted to announce that the Zetadocs Delivery and Zetadocs Capture Extension for Business Central is now available on AppSource, the app store for Business Central. This is an ...