Installation guide
Zetadocs for NAV Installation Guide
This edition 5
th
December 2012 © Copyright Equisys plc 2012 All trademarks acknowledged All rights
reserved
Page 90
15. Send Any Report
In the installation guide earlier we saw how to configure Zetadocs for NAV to send reports from the Sales
Order and Purchasing processes. We edited the NAV reports for Zetadocs for NAV and set the report
settings to point at the Customer or Vendor reference for that report and the respective Contact reference.
With this information Zetadocs for NAV was able to extract the references and query the names, email
addresses and fax addresses of the contact, as well as, cross reference the company (Customer or Vendor)
reference with the associated Zetadocs Customer or Vendor rules tables to apply per company formatting
and addressing logic. This however is not the limit of Zetadocs for NAV functionality. This principle of field
reference and related information resolution can be applied to almost any report. In this section we will see
how small changes in the report settings can control and alter the information used to address, format,
send and archive a report using Zetadocs for NAV.
15.1 Configured Send
It should be clear by now from the installation guide that by setting the “Company Type Code”, “Company
No. Field No.” and “Contact No. Field No.” fields in the Zetadocs Report Settings that you can configure
Zetadocs for NAV to automatically resolve your contact information and apply company specific rules if they
exist. In this way it is possible to reference any fields which contain the right type of reference (i.e.
customer/vendor or contact etc). There is some logic to the application of these settings that is important to
know to help decide what settings to enter but it also gives the opportunity for some variations in
configuration.
Zetadocs Report Settings Field No.’s Reference Logic (Pseudo Code)
IF Company Type Code <> NULL THEN
IF Company No. Field No. <> NULL THEN
Get the Company No. from Record using Field No.
ELSE
CALL Integration codeunit GetCompanyForReport for VAR to get Company No.
END
END
Send Result.VALIDATE(Company No., Company No. Value)
IF Contact No. Field No. <> NULL THEN
Get the Contact No. from Record using Field No.
ELSE
CALL Integration codeunit GetContactForReport for VAR to get Contact No.
END
Send Result.VALIDATE(Contact No., Contact No. Value)
From this it is important to notice the order that validation happens in as this coordinates with the Zetadocs
Send Result table OnValidate trigger code for “Company No.” and “Contact No.”. Since the company
information is validated first no contact reference will be set yet. We can check for this and default to using
the company’s communication information, later when the contact reference is validated we can override
the addressing information (email, fax). This provides the fallback addressing logic of Zetadocs for NAV so
that if a record has a blank reference for a contact we will still end up with the company correspondence
information. This means that we can deliberately control what information is used by altering the settings. It
also means that this behavior can be customized by the VAR by implementing the get trigger functions in
the Zetadocs-Send Integration codeunit and/or changing the OnValidate triggers in the Zetadocs Send
Result table.
Company Type Code
Company No. Field No.
Contact No. Field No.
Resulting Addressing
Info Used
SET
SET
SET
Contact Info unless the
reference in record is
blank THEN Company