Programming Microsoft Dynamics NAV(Fifth Edition)
上QQ阅读APP看书,第一时间看更新

Template

The Template table type operates behind the scenes, providing control information for a Journal, which operates in the foreground. By use of a Template, multiple instances of a Journal can each be tailored for different purposes. Control information contained in a Template includes the following:

  • The default type of accounts to be updated (for example, Customer, Vendor, Bank, and General Ledger)
  • The specific account numbers to be used as defaults, including balancing accounts
  • What transaction numbering series will be used
  • The default encoding to be applied to transactions for the Journal (for example, Source Code and Reason Code)
  • Specific pages and reports to be used for data entry and processing of both edits and posting runs

For example, General Journal Templates allow the General Journal table to be tailored in order to display fields and perform validations that are specific to the entry of particular transaction categories such as Cash Receipts, Payments, Purchases, Sales, and other transaction entry types. Template tables always use tabular pages for user input. The following screenshot shows a listing of the various General Journal Templates defined in the Cronus International Ltd. demonstration database:

In addition to the Templates, there are Batch tables, which allow us to set up any number of batches of data under each journal template. The Batch, Template, Journal Line structure provides a great deal of flexibility in data organization and definition of required fields while utilizing a common underlying table definition (the General Journal).