Installation guide

Zetadocs for NAV Installation Guide
This edition 5
th
December 2012 © Copyright Equisys plc 2012 All trademarks acknowledged All rights
reserved
Page 73
IF (STRLEN(info) > 4) AND (COPYSTR(info, 1, 4) = 'SHIP') THEN
BEGIN
info := STRSUBSTNO(strSalesShipment, COPYSTR(info, 5));
END;
The code then detects that our barcode starts with SHIP and acts accordingly.
Adding additional IF statements for other reports
If then you wanted to add barcode support to another report then you would need to modify the report as
per the steps in section 12.2 adding the SourceExpr value shown below. Note you can use whatever
identifier seems appropriate in this case we have chosen to setup a Sales Invoice report so have chosen
SINV and have replaced Sales Shipment Header for Sales Invoice Header.
SourceExpr = STRSUBSTNO('*SINV%1*',"Sales Invoice Header"."No.")
We then need to add an additional if statement to match this:
// if the barcode starts with SINV
IF (STRLEN(info) > 4) AND (COPYSTR(info, 1, 4) = ' SINV ') THEN
BEGIN
info := STRSUBSTNO(strSalesInvoice, COPYSTR(info, 5));
END;
This can be repeated as desired for any remaining reports.
12.4 Write code in the GetAutoLink function
Zetadocs calls the function GetAutoLink for each item in the queue so that you can determine if it can be
automatically associated with a NAV record. Details of recognized barcodes are included so that you can
write any necessary functionality to lookup the NAV record. If you plan to have this function called
automatically from the NAS server or from other codeunits, it is recommended that you do not include user
input operations.
The GetAutoLink 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.
ZdDocQueueBarcodes
Record
Zetadocs
Doc. Queue
Barcodes
Read
A read only runtime table that
allows you to access the values of
all barcodes from the document
queue item.
ZdLinkResult
Record
Zetadocs
Link Result
Read/Write
A writable runtime table to allow
you to return the un-typed
RecordID reference to a NAV
record, error states and
messaging.
ZdControlFile
Text
[250]
Read
Path to the DQF file for the
document queue item (XML file).
Provided to allow you to fetch
other information about converted
files.
Sample Code:
This sample code shows an implementation of GetAutoLink that finds and returns the matching record ID.