The Journal Template-Batch-Line Pattern
In the Financial systems, Journals are used for accounting. Microsoft Dynamics NAV has an Architectural Pattern called Journal Template-Batch-Line that ensures data integrity, and acts as a datacontract for each transaction.
Technical description
Journals are the datacontracts, employed to create entries that are used for the accounting purposes. They can be used either manually via the user interface, or automated via processes, such as documents or batch programs.
Each Journal has a Journal Line table that has a Journal Template Code, and a Journal Batch Code. The Template can be used to influence the functional user interface, and the reports are being used in the process. The Batch allows different users to use the Journal at the same time without interfering with each other, or temporarily keep data in a Journal until it is ready to be posted.
The following diagram explains how to implement the Journal Template-Batch-Line Pattern...