Installation guide
Zetadocs for NAV Installation Guide
This edition 5
th
December 2012 © Copyright Equisys plc 2012 All trademarks acknowledged All rights
reserved
Page 75
Modified IF Statement for the Sales Invoice
// If the barcode starts with SINV it means it is a Sales Invoice.
// The barcode will be in the format SINV000000, where 000000 is the Sales Invoice number
IF (STRLEN(barcodeVal) > 4) AND (COPYSTR(barcodeVal, 1, 4) = 'SINV') THEN
BEGIN
ShipmentRec.RESET;
ShipmentRec."No." := COPYSTR(barcodeVal, 5);
// If we can find the record that the barcode refers to
IF ShipmentRec.FIND THEN
BEGIN
// if the user selected a record use a RecordRef to get the RecordID for the record
// and modify the ZdLinkResult record to include it
RecRef.GETTABLE(ShipmentRec);
ZdLinkResult."Record ID" := RecRef.RECORDID;
ZdLinkResult.MODIFY;
END;
END;
EXIT;
END;
Test document auto linking
At this stage you should test that the functionality you have added works by doing the following:
Print a modified report that includes a barcode.
Scan the printed report into your new document queue.
Check that the document is listed in the document queue within NAV and can be viewed correctly.
Check that the scanned document displays the appropriate text in the Link column.
Click the Archive button and complete the actions.
Browse to the SharePoint library and check that the document has been archived successfully in
the correct location.
View the document properties in SharePoint and check these are as expected.
(Finally, when you have completed your testing delete any test documents from the SharePoint
archive.)
12.5 Further Capture Customizations
Overview
In this section a number of advanced functions are described that will help you to do further customisation
of the document queue capture process. The functions available are:
PreArchive
PostArchive
PreArchive
The PreArchive function is similar to the OverrideSendResult function in the delivery parts of the Zetadocs
SDK. This function gives a writable copy of the final information to be used in the archiving of the document
from the queue. It is at this point that you get the opportunity to override the archive location and content
type.
The PreArchive function has the following parameters:
Parameter
Type
Sub-type
Read/Write
Description
ZdArchiveContext
Record
Zetadocs
Archive
Context
Read
A read only runtime table to
provide context information like
the queue the item is in and the
menu item that was clicked by the
user.
ZdArchiveSettings
Record
Zetadocs
Read/Write
A writable runtime table to allow