Technical Notes, Zetadocs

PRB: Sent remittance advice reports do not appear in the vendor's related documents

ZTN4179

ID: ZTN4179

This Zetadocs technical note applies to:

  • Versions 4.x of Zetadocs for NAV

Symptom

When a remittance advice – journal report is sent and archived to SharePoint using Zetadocs it should appear in the list of related documents for the vendor record that it was based on. In some cases this is not happening.

On sending a remittance advice – journal report, a Zetadocs Archive ID is generated for it, but it is not saved against the vendor record. This means that the related documents cannot be retrieved.

Cause

This problem occurs because of an error in the modifications made to the report.  By following the standard report modification instructions, the code in the ‘Zetadocs – OnPostDataItem()’ trigger would look like this:

ZdRecRef.GETTABLE(VendTemp);

ZdSend.AddRecord(ZdRecRef.RECORDID);

This code causes the problem because VendTemp is a temporary record, so the record id that is being passed into the AddRecord function is pointing at a temporary record rather than the record in the database that we actually want to modify.

Resolution

To correct this problem, some modifications should be made to the code in the ‘Zetadocs – OnPostDataItem()’ trigger.

First, create a new local variable:

  • Name:               ZdVendor
  • Type:                Record
  • SubType:          Vendor

Then change the code in the trigger to the following:

ZdVendor.RESET;

ZdVendor.SETRANGE(ZdVendor." No." , VendTemp." No." );

IF ZdVendor.FIND('-') THEN

BEGIN

  ZdRecRef.GETTABLE(ZdVendor);

  ZdSend.AddRecord(ZdRecRef.RECORDID);

END;

Status

This has been identified by Equisys as a problem with the software versions given above.

Last updated: 24th February 2012 (JW/MW)