HOWTO: Adding additional Metadata information using the Zetadocs Metadata Mappings Table
This Zetadocs technical note applies to:
- Version 5.0 and later of Zetadocs for Microsoft Dynamics NAV
This technical note describes the steps required to configure additional metadata to be archived with a document. This is done by adding information to the Zetadocs Metadata Mappings table in NAV which adds metadata for both delivered and captured documents without the use of custom code. This functionality is not supported when using the Zetadocs Archive to store your documents
The Zetadocs configuration files contain details of the fields to use for metadata for the Sales and Purchase Header tables. To extend the fields archived against a record you must modify the Zetadocs Metadata Mappings table. Note for functionality beyond Sales and Purchase documents you must follow ZTN4274. The steps below add the Vendor Invoice No. available on the Purchase Header table, but the steps can be repeated for other fields of NAV by changing the Table Field ID details as required.
We can only take metadata values from the table that you are archiving against, so if you have some complex logic whereby you want to get a value from a related table, you will have to go back to using the GetAdditionalMetadata function which is part of the Zetadocs SDK.
- Open the object designer (Shift + F12) and locate the table which contains the details for the form/page you wish to configure, in this case the Purchase Header Table (38) and select Design.
- Locate the fields which contain the information you wish to archive and make note of the field IDs, in this case Vendor Invoice No. is Table field ID 68.
- Return to the object designer and run the Zetadocs Metadata Mappings Table (9041212).
- Add a new entry, in this case we add a Table ID of 38, this populates the Table Name field (Purchase Header).
- Next enter a Metadata Field Name and specify the Table Field ID of the value you require adding as metadata, in this case VendorInvoiceNo and its Table Field ID 68 respectively.
Please note: As you are adding a new piece of metadata in the table then you should add a new corresponding SharePoint column within the Zetadocs content type in SharePoint (see below).
- When Zetadocs archives a document against a record in the Purchase Header table, it will take the value from field number 68 (Vendor Invoice No.) and put it into a custom metadata field in SharePoint called “VendorInvoiceNo”.
Adding additional metadata column within the Zetadocs content type in SharePoint
The steps below are for SharePoint Online, please see your SharePoint support materials for steps specific to other versions.
- Navigate to your SharePoint site and go to Site Settings, and select Site Content Types from Web Designer Galleries.
- Choose Zetadocs, and select the Add from new site column option at the bottom of the page.
- Type a name for the new column without spaces, in this example VendorInvoiceNo (Note: you can change the display name later). Be sure to put this site column into existing group Zetadocs and click OK.
- You can now change the display name by going to the Zetadocs library, click the Library tab and then Library settings from the ribbon.
- Click the VendorInvoiceNo Column from the Column list and type a preferred name for the column, then OK. Note if your column does not appear you may have missed the step above which puts this site column into the existing group – Zetadocs.
- Your new metadata field is now ready to be used to filter documents in the Zetadocs library.
Metadata limitations using this method:
- Metadata values can only come from the table that you are archiving against.
- These steps add the Vendor Invoice number as metadata for any record in the Purchase Header table, which includes quotes, orders, invoices, credit memos etc.
Last updated: 4th December 2013 (MW/)