Overriding the standard FORNAV document archiving
The FORNAV Customizable Report Pack comes with a built-in archiving feature. This feature automatically archives any FORNAV report that was used, and stores the output and metadata in the FORNAV Archive.
Some FORNAV users don’t want to store these archived documents in the Business Central database but would rather use an external database like the Azure Blob Storage, SharePoint, OneDrive, DropBox, or any other third-party document storage.
To enable this, we have created an event in codeunit 6189104 “ForNAV Document Archive Mgt.” that you can use to override the default archiving.
The event is called OnBeforeWriteToArchiveInternal and has the following signature:
- ReportID: Integer. The report ID.
- ReportAction: Option SaveAsPdf, SaveAsWord, SaveAsExcel, Preview, Print, SaveAsHtml . The report action that the user has chosen.
- Copies: Integer. The number of copies that the user has generated.
- var archiveKeyWords: Text. Contains metadata about the document.
- is: InStream. The document as a stream. Depending on the report action, this could be a PDF, docx, xlsx, or html file.
- var IsHandled: Boolean. If set to true, the standard FORNAV archiving code will not run and FORNAV will not archive the document.
Latest news
Latest knowledge base articles
-
AI Assistant in the ForNAV Designer (beta)
-
Mapping from Business Central documents to ZUGFeRD and XRechnung
-
Using native Business Central ZUGFeRD generation with FORNAV reports
-
Repeater tables and barcodes in the ForNAV Template Editor
-
Controlling report language, format region, copies, and watermark with the Report Settings page
