Equisys technical notes

Technical guidance, explanations and fixes for our products

FIX: “Failed to search for documents in SharePoint” error when records have large number of lines



ID: ZTN4352

This Zetadocs technical note applies to:

  • Zetadocs NAV 5.5 and above


When opening a NAV record which has a large number of associated lines, an error message “Failed to search for documents in SharePoint” is shown and no related documents appear in the Zetadocs addin. This is more likely to occur in a 32 bit SharePoint system.

Users may also notice the Zetadocs Document Factbox loading and archiving slowly in records with large numbers of lines.


Zetadocs needs to pass a query to SharePoint in order to fetch all related documents for the open NAV record and any associated records. The search query includes searches for documents archived against line items, which do not usually have documents associated with them. This combined query results in a large SharePoint search when there are a large number of lines associated with the record.

When SharePoint performs the search, it is possible that the memory limit for a 32-bit process is reached, and thus a memory error is returned to Zetadocs, which results in the “Failed to search for documents in SharePoint” error message.


This issue has been resolved in the September update rollup (6.1.338) of Zetadocs for NAV, available for download here.

Please note that for NAV 2013, the fix is available in the September update rollup with a file date of 10th February 2015.

The fix involves a change in configuration that needs to be performed manuallyThe steps to exclude the line items are detailed below:

  1. Run Table9041213 – Zetadocs Record Mapping Header from the Object Designer.
  2. Delete each to following mappings:
    • 4 Purchase Invoice Line -> Posted Purchase Receipt
    • 8 Purchase Header -> Purchase Lines
    • 9 Posted Puchase Invoice -> Posted Purchase Invoice Line
    • 14 Sales Header -> Sales Line
    • 15 Posted Sales Invoice -> Posted Sales Invoice Line
    • 32 Posted Purchase Invoice -> Posted Purchase Receipts
    • 44 Posted Shipment -> Shipment Line
    • 45 Posted Credit Memo -> Posted Credit Memo Line
    • 46 Posted Return Receipt -> Posted Return Receipt Line
    • 47 Posted Purchase Receipt -> Posted Purchase Receipt Line
    • 48 Posted Purchase Credit Memo -> Posted Purchase Credit Memo Line
    • 49 Posted Return Shipment -> Posted Return Shipment Line

Note: Archived documents against these line items will no longer appear in the Zetadocs addin for the opened record type.


This behaviour was corrected in the update detailed above.

Last updated: 17th Jully 2020 (CR/NT) 

Keywords: SharePoint memory search fail delay factbox slow to load


Recent news

In our recent blog ‘ Working from home with the cloud ’, we shared how the number of homeworkers has increased tremendously due to COVID-19. So, how can we improve productivity whilst ...

This article describes the new features and other improvements in the August 2020 update of the Zetadocs Expenses service. Zetadocs Expenses Release ...