Equisys Technical Notes

Technical guidance, explanations and fixes for our products

PRB: Moving negative lines on a Sales or Purchase Order causes loss of control of NAV RTC due to pages flickering

Print

ZTN4332

ID: ZTN4332

This Zetadocs technical note applies to:

  • Versions v5.x/v6.x/v7.0 of Zetadocs for NAV
  • Microsoft Dynamics NAV 2013, NAV 2013 R2, NAV 2015

Symptom

This issue occurs on a Sales Order with the Zetadocs Factbox enabled.

If there are one or more negative lines in the Sales or Purchase Order, there is an option to move the negative lines to another document type, such as a Return Order. On clicking OK, and then Yes when asked to view the created document, the new document will be opened, and then the focus will keep switching between the new document and the existing Sales or Purchase Order, resulting in a flickering effect and loss of control of NAV. The only way to regain control is to end the NAV client process from task manager.

Cause

This is due to a refresh function used by the Zetadocs addin that is activated when a NAV page changes (for instance, when you navigate from one record to another using the navigation buttons, or when a negative line is taken out). This also occurs when focus is given to the NAV page.

Resolution

For the affected pages, the Zetadocs code on the pages should be modified as follows:

  • Add a C/AL Global named PrevRecID of type RecordID
  • In the OnAfterRecord() function, modify the code to read as below (changes highlighted in red):

BEGIN
ZdRecRef.GETTABLE(Rec);
IF ZdRecRef.GET(ZdRecRef.RECORDID) AND (ZdRecRef.RECORDID <> PrevRecID)
THEN BEGIN
PrevRecID := ZdRecRef.RECORDID;
CurrPage.Zetadocs.PAGE.SetRecordID(ZdRecRef.RECORDID);
CurrPage.Zetadocs.PAGE.ACTIVATE(TRUE);
END;
END;

Note that a newline is required before the first THEN statement, whereas existing code block is on one single line.

  • Save and compile the modified page.

Note that the changes are required for both pages in the process (e.g. Sales Order and Sales Return Order) if they have both been modified to use Zetadocs functionality.

Status

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

Last updated: 29th October 2014 (NT/BM) 

Keywords: Sales Purchase Order move negative line freeze flickering

EquisysLogo

Recent news

This article describes the new features and other improvements in the August 2019 release of the Zetadocs Expenses service. Zetadocs Expenses ...

This article describes the new features and other improvements in the latest release of Zetafax. This improves support for using Fax over IP (FoIP) with SIP trunks and public SIP fax services, ...