Document Attachment with Item Journal Table in Business Central
Business Central already provides the Document Attachment framework, but sometimes you need to extend it to work with additional tables. In this blog, I’ll show you how I extended the Document Attachment functionality to support the Item Journal Line table. By the end, you’ll be able to attach documents (like invoices, PDFs, or scanned files) directly to item journal lines and view them from the journal page. Step 1: Extend the Document Type First, extend the Document Type in the Document Attachment table to include a new option for Item Journal . This makes it possible to tag an attachment specifically for an item journal line. enumextension 50500 "Attachment Dc" extends "Attachment Document Type" { value ( 50500 ; "Item Journal" ) { Caption = 'Item Journal' ; } } Step 2: Add Template Name and Batch Name Fields The standard Document Attachment table doesn’t store the Template Name and ...