FIX: Error when opening RTC client page with Zetadocs Factbox enabled
ZTN4538
This Zetadocs technical note applies to:
- Version 11.1.2506 of Zetadocs for NAV
- 32-bit versions of Microsoft Dynamics NAV 2015 and onwards
Summary
When opening a page with the Zetadocs Factbox the user receives an error similar to:
Method ‘Pagexxxx.Zetadocs Capture Addinxxxx, with matching argument types.’ not found.
Cause
The error occurs when the Zetadocs Control Add-in (used in the 32-bit NAV Client environment) receives instructions intended to the Zetadocs Web Add-in (usually used in the 64-bit NAV client environment).
Resolution
This issue can be resolved with the following workaround by removing the Zetadocs Control Add-in and displaying the Zetadocs Web Add-in instead.
The following steps will remove the Zetadocs Control Add-in Factbox and use the Web Add-in Factbox (commonly named x64) instead. The WebFactbox is x86 compatible.
The first part of the modifications removes the error and enables the 64-bit Factbox. The second part of the modifications is only required when using NAV 2015, it enables the greyed out “Add” button within the Factbox.
Enforce the Zetadocs WebFactbox by removing the Zetadocs Control Add-in Factbox
1. Navigate to the NAV Development Environment and select the Page that has Zetadocs Factbox. For example, Sales Invoice:
2. Right click on the page > Design > and remove/delete the highlighted line as shown below:
3. Then, open the source code and perform the steps in the order as below:
You will see this piece of code under the OnInit() method:
OnInit()
//ZD11.0
ZDWinAddinVisible := ZDAddin.IsWebClient OR ZDAddin.IsWinClientAddinPresent;
ZDWebAddinVisible := ZDAddin.IsWebClient OR ZDAddin.IsWebAddinVisible;
ZDSaveAndSendVisible := ZDAddin.IsWinClientAddinPresent;
//ZD11.0
Replace it with the following code:
OnInit()
//ZD11.0
//ZDWinAddinVisible := ZDAddin.IsWebClient OR ZDAddin.IsWinClientAddinPresent;
//ZDWebAddinVisible := ZDAddin.IsWebClient OR ZDAddin.IsWebAddinVisible;
ZDWebAddinVisible :=TRUE;
ZDSaveAndSendVisible := ZDAddin.IsWinClientAddinPresent;
//ZD11.0
Next, go to this piece of code under the OnAfterGetCurrRecord() method where the piece of code as below…
//ZD11.0
IF GUIALLOWED THEN
BEGIN
ZdRecRef.GETTABLE(Rec);
IF ZdRecRef.GET(ZdRecRef.RECORDID) AND (ZdRecRef.RECORDID <> ZdPrevRecID) THEN
BEGIN
ZdPrevRecID := ZdRecRef.RECORDID;
IF ZDWinAddinVisible THEN
BEGIN
CurrPage.Zetadocs.PAGE.SetRecordID(ZdRecRef.RECORDID);
CurrPage.Zetadocs.PAGE.UPDATE(TRUE);
END;
IF ZDWebAddinVisible THEN
BEGIN
CurrPage.WebClient.PAGE.SetRecordID(ZdRecRef.RECORDID);
CurrPage.WebClient.PAGE.UPDATE(FALSE);
END;
END;
END;
//ZD11.0
…will need to be replaced with:
//ZD11.0
IF GUIALLOWED THEN
BEGIN
ZdRecRef.GETTABLE(Rec);
IF ZdRecRef.GET(ZdRecRef.RECORDID) AND (ZdRecRef.RECORDID <> ZdPrevRecID) THEN
BEGIN
ZdPrevRecID := ZdRecRef.RECORDID;
//IF ZDWinAddinVisible THEN
//BEGIN
// CurrPage.Zetadocs.PAGE.SetRecordID(ZdRecRef.RECORDID);
// CurrPage.Zetadocs.PAGE.UPDATE(TRUE);
//END;
IF ZDWebAddinVisible THEN
BEGIN
CurrPage.WebClient.PAGE.SetRecordID(ZdRecRef.RECORDID);
CurrPage.WebClient.PAGE.UPDATE(FALSE);
END;
END;
END;
//ZD11.0
Additional Modification (only for NAV 2015):
WARNING: This step should not be used with Client Side delivery, as the functionality will become unavailable. If you are using Client-Side delivery, you will need to migrate to Server Side delivery.
WARNING: At the time of writing this technote, Drag and Drop is not supported by the NAV2015 web factbox. This functionality is only available with the Web Factbox from NAV2016.
The following modification enables the greyed out “Add” button within the Factbox. It requires Zetadocs NAV Client to be closed prior to the changes. The modification needs to be done on every machine that was set up for the Client-Side Delivery.
Please go to the following path (C:\Program Files (x86)\Microsoft Dynamics NAV\<>\RoleTailored Client\Add-ins) and delete the two highlighted folders:
After the folder deletion, please restart the NAV service.
References
Last updated: 16th September 2021 (AL/BB/CR)
Keywords: NAV 32-bit Factbox 64-bit WebFactbox “With matching argument types not found” “Page9041209.Zetadocs Capture”