ZUGFeRD e-document data is now built in memory
A new internal codeunit, ForNAV eDocument Factory, now holds the intermediate ZUGFeRD/Peppol e-document data (parties, trade line items, tax, payment terms, references, and so on) in memory for the duration of document generation, instead of writing it to the database first. The document ID counter is now an in-memory counter on the same codeunit.
- The ZUGFeRD buffer tables (ForNAV Party, GlobalID, Contact, LegalOrganization, ElectronicAddress, URIUniversalCommID, TaxRegistration, Note, TradeLineItem, TradeAllowanceCharge, Tax, ServiceCharge, PaymentTerms, PaymentMeans, BankAcc, FinancialCard, AddRefDoc, SellerOrderRefDoc, BuyerOrderRefDoc, ContractRefDoc, DespatchAdviceRefDoc, DeliveryNoteRefDoc, InvoiceRefDoc, AssociatedDoc, SpecProcProj, IncludedRefProd, ApplProdChar, RecvSpecTradeAcc) and the ForNAV Delete Old Invoices codeunit currently remain in the app as regular (non-temporary) objects, but are marked ObsoleteState = Pending — they are no longer written to by default and are slated to become temporary, in-memory-only tables in a future release.
- Possible breaking change: By default, intermediate ZUGFeRD/Peppol data is no longer persisted to these tables — it only exists transiently in the in-memory ForNAV eDocument Factory buffer while a document is being generated. We recommend partners keep using the supported Init…/FindFirst… procedures on the ForNAV InvoiceDescriptor table (for example, FindFirstBuyer, FindFirstTradeLineItems, …) to read this data — those continue to work unchanged, now reading from the in-memory factory under the hood. Only code that bypasses these procedures and reads the buffer tables directly (or subscribes to events expecting the records to be findable in the database) will no longer find any data.
- Misuse of the two data paths is caught with a clear error instead of failing silently: calling a FindFirst… procedure with a non-temporary record while the in-memory dataset is active, or reading from the in-memory buffer (“ForNAV eDocument Factory”.GetRecord) while Disable In-Memory e-Document Dataset is enabled, raises an error naming the table involved.
- Temporary fallback: a temporary fallback has been added to the old physical tables. This is enabled automatically. It is important that partners disable this as soon as possible and rework existing customizations. We will remove this setting in the fall BC29 release.
