Technical Notes, Zetadocs

PRB: Documents Factbox displays wrong record after clicking Open in Excel

ZTN4558

This Zetadocs technical note applies to:

  • Zetadocs Delivery and Zetadocs Capture Extension 2.0.21097 and earlier
  • Business Central 17.5 and and later

Symptom

On a List page in Business Central, after clicking 'Open in Excel', the Zetadocs Factbox does not display the documents for the record that is selected in the list but instead displays documents for the last record in the list.

Archiving a Document will add this document to the last record of the Business Central List instead of the selected document.

Cause

On Business Central 17.5 and onwards, when clicking Open in Excel, Business Central triggers the OnAfterGetCurrRecord event for every single record in the business central list.

Zetadocs uses this event to identify the record selected in the list so to display associated documents and how to archive new documents.

The last event triggered by Business Central is the last item on the list, and it is what Zetadocs uses until another item in the list is selected. 

Resolution

To recover from this situation, select another record in the Business Central list and select the desired record.

Status

We are working with Microsoft to fix this issue for updated versions of Business Central.

Last updated: 4th May 2021 (CR) 

Keywords: Factbox, wrong document, open in excel, refresh