Technical Notes, Zetadocs

HOWTO: Send Remittance Advice reports using Zetadocs

ZTN4375

This Zetadocs technical note applies to:

  • Version 10 of Zetadocs for NAV or later
  • Microsoft Dynamics NAV 2009 R2 or later for Zetadocs Client Delivery
  • Microsoft Dynamics NAV 2015 or later for Zetadocs Server Delivery
  • NAV GB database
  • NAV W1 database for NAV 2018 or later

Summary

Remittance advice report settings are not part of the standard Zetadocs Report Settings configuration file as they are not included in every NAV country version. This article includes instructions to send Remittance Advice with Zetadocs NAV Server delivery and the Zetadocs Client.

More information

To setup the Remittance Advice reports to be used in Zetadocs you will need to follow one of two steps detailed below depending on your deployment scenario.

Zetadocs Server Delivery:

·         Report 10531 (Remittance Advice - Journal)

·         Report 10532 (Remittance Advice - Entries)

Zetadocs Client Delivery:

·         Report 10531 (Remittance Advice - Journal)

·         Report 10532 (Remittance Advice - Entries)

Note: On NAV 2018 systems, Report 10531 is renamed to Report 399 and Report 10532 to Report 400.

Zetadocs NAV Server Delivery

eport 10531 (Remittance Advice - Journal)

NOTE: To successfully send Report 10531 (Remittance Advice - Journals), Zetadocs relies on the Record to exist when Sending. Since this process is asynchronous the sent record cannot be posted as soon as the job is queued. Instead the record should be kept unchanged until is sent via Zetadocs. If this is not the case, Zetadocs Server delivery will stop the process and will not continue because the record does not match what has been queued to send.

There are a couple of options that will help with this in case you want to streamline your process:

Option 1 – Send and Post

Version 10 of Zetadocs for NAV now offers a new function in the Zetadocs Send Integration Codeunit - the OnAfterZetadocsSend. Within this function there is sample code provided to Post the General Journal Line after the remittance has been sent. This will allow you to use Send and Post or even write your own posting routines within this function. You will need to consider that this is a Server only function and will not have a UI thread available. If you choose to go with this option, you might want to consider hiding/removing the existing Post button.

Option 2- Block/Warn post until is sent via Zetadocs

With option 1 the user will still be able to Post a record before Zetadocs has the chance to send the Report. To reduce the chance of this happening you can also edit the existing posting button under a flag check (e.g. SentViaZetadocs) that will allow you to block or warn the user that the record has not been sent yet. Then using the OnAfterZetadocsSend function you will be able to set said variable.

Add a new entry in Zetadocs Report Settings

·         Report: 10531 (Remittance Advice - Journal)

o    Report Mappings:

Report Table ID

81

Report Table Filter

Report DataItem Name

FindVendors

Report Pre-Processing

YES

o    Table Mapping:

Company Type Code

VEND

Company Field No.

4

Contact No. Field No.

0

Record No. Field No.

7

Edit the Zetadocs Send Integration codeunit

The following steps should be taken to make the PDF file name more readable:

·         In the function GetOutputFileName create the following text constant:

o    strRemittanceAdvice:

§  ConstValue: Remittance Advice

·         In the same function add the following code just under the line “CASE tableID OF”:

///////////////////////////////////

//Gen Journal Lines

///////////////////////////////////

81:

BEGIN

    RecRef.GET(Record);

      fieldRef := RecRef.FIELD(7);

EXIT(STRSUBSTNO('%1-%2',strRemittanceAdvice,fieldRef.VALUE));

END;

Add Zetadocs Send buttons

You now need to add the Zetadocs Delivery buttons to send and track Remittance reports.

·         Export page 256 - Payment Journals as text files using the Dynamics NAV Development Environment.

·         Load this page into the Zetadocs Page Modification Tool, enable Send, set the NAV Report Selection to Report Selection – Bank Acc: Check and press Start to modify this page.

·         Import the modified page into the Dynamics NAV Development Environment and compile it.

NAV Report Selections

Search in NAV for Report Selection – Bank Acc and add report 10531 in the Check usage list below 1401 Check. This will enable the user to choose the report to be sent without hard-coding the report ID behind the Zetadocs Send button.

Test your report

Test the Remittance Advice - Journal report to ensure the report settings are correct.

Report 10532 (Remittance Advice - Entries)

Add a new entry in Zetadocs Report Settings

·         Report: 10532 (Remittance Advice - Entries)

o    Report Mappings:

Report Table ID

25

Report Table Filter

Document Type=CONST(Payment)

Report DataItem Name

Vendor Ledger Entry

Report Pre-Processing

YES

o    Table Mapping:

Company Type Code

VEND

Company Field No.

3

Contact No. Field No.

0

Record No. Field No.

1

For the Report: 10532 (Remittance Advice - Entries) the following steps should be taken:

·         Go to the Development Environment and Design the codeunit 9009963 Zetadocs-Send Integration.

·         In the function GetContactForReport create the following variables:

o    Vendor:

§  DataType: Record

§  SubType: Vendor

o    VendorFieldRef:

§  DataType: FieldRef

o    VendorCode:

§  DataType: Code

§  Length: 20

·         In the same function copy and paste the following code:

tableID := Record.TABLENO;

RecRef.GET(Record);

CASE tableID OF

25://"Vendor Ledger Entry"

BEGIN

      Vendor.RESET;

      VendorFieldRef := RecRef.FIELD(3);

      VendorCode := VendorFieldRef.VALUE;

      Vendor.SETFILTER("No.",VendorCode);

IF Vendor.FIND('-') THEN

BEGIN

        EVALUATE(Contact,Vendor."Primary Contact No.");

EXIT(Contact);

END;

END;

END;

EXIT('');

The following steps should also be taken to make the PDF file name more readable:

·         In the function GetOutputFileName create the following text constant:

o    strRemittanceAdvice:

§  ConstValue: Remittance Advice

·         In the same function add the following code just under the line “CASE tableID OF”:

  ///////////////////////////////////

  //Vendor Ledger Entry

  ///////////////////////////////////

  25:

    BEGIN

    RecRef.GET(Record);

      fieldRef := RecRef.FIELD(1);

EXIT(STRSUBSTNO('%1-%2',strRemittanceAdvice,fieldRef.VALUE));

END;

Add Zetadocs Send buttons

You now need to add the Zetadocs Delivery buttons to send and track Remittance reports.

·         Export page 29 - Vendor Ledger Entries as a text file using the Dynamics NAV Development Environment.

·         Load this page into the Zetadocs Page Modification Tool, enable Send, set the NAV Report Selection to Report Selection – Bank Acc: Check and press Start to modify this page.

·         Import the modified page into the Dynamics NAV Development Environment and compile it.

NAV Report Selections

Search in NAV for Report Selection – Bank Acc and add report10532 in the Check usage list below 1401 Check. This will enable the user to choose the report to be sent without hard-coding the report ID behind the Zetadocs Send button.

Zetadocs Metadata Mappings

A final step is to check whether your Zetadocs installation has Gen. Journal Line (table 81) metadata mappings configured. This can be found by opening the Development Environment, running the Zetadocs Metadata Mappings table, and looking for the below entries. If these are missing, ensure you add them as they are required for sending and archiving Remittance Advice Reports. 

Test your report

Test the Remittance Advice - Entry report to ensure the report settings are correct.

Zetadocs Client Delivery

When modifying Remittance Advice reports with the Zetadocs Report Modifier Tool it might display an error. This technical note includes remittance advice sample reports as well as the steps to import the objects.

Note: the sample reports provided in this technote do not contain Word Layout modification, please visit the references at the end of this technical note for more information.

Please follow the steps below to install the sample reports:

  • Import sample remittance reports.
  • Add a new entry in Zetadocs Report Settings.
  • Test your RDLC report.
Import sample remittance reports

To import the remittance advice sample reports:

  • Extract the contents of the file.
  • Open the object designer in the development environment.
  • Import the sample reports that corresponds with your NAV system. Each set of objects contains the following reports:
    • Report 9009975 - ZD-Remittance Advice - Journal
    • Report 9009976 - ZD-Remittance Advice - Entries

Note: Those using NAV 2009 please compile the reports after importing them. It requires Microsoft Dynamics NAV developer licence.

Add a new entry in Zetadocs Report Settings

Please see the ‘Updating the Zetadocs Report Settings to match your Reports’ section in the Zetadocs for NAV Essentials Installation Guide to create a new entry in Zetadocs Report Settings. Please remember to add one entry per sample report.

The following should be entered into the field number columns for the 2 sample reports:

·         Report: 9009975 (Remittance Advice – Journal)

o    Report Mappings:

Report Table ID

23

Report Table Filter

Report DataItem Name

Vendor

Report Pre-Processing

YES

o    Table Mapping:

Company Type Code

VEND

Company Field No.

1

Contact No. Field No.

5049

Record No. Field No.

1

·         Report: 9009976 (Remittance Advice – Entries)

o    Report Mappings:

Report Table ID

25

Report Table Filter

Report DataItem Name

Vendor Ledger Entry

Report Pre-Processing

YES

o    Table Mapping:

Company Type Code

VEND

Company Field No.

3

Contact No. Field No.

0

Record No. Field No.

1

Test your RDLC report

After importing the sample reports and updating the Zetadocs Report settings page to match your reports the installation is complete. It is recommended to test the sample reports to verify a successful installation, to do so please run your report directly from your development environment.

References

HOWTO: Manually modify Word Layout reports in NAV 2015 or NAV 2016

Last updated: 8th January 2024 (JC/CR/MT) 

Keywords: Remittance advice entries and remittance advice journal sample reports