The Entry Pattern

Most EARP systems are data cemeteries. A lot of data comes in, nothing much ever comes out. To store data in Microsoft Dynamics NAV, the Entry Pattern is most popular with over 75 implementations in the standard product.

Technical description

Although there are many variations, all entry tables have the same technical structure that can be expanded upon the functional requirements.

The Primary Key for all the entry tables is a field called Entry No. of the type Integer. The value of the field is determined using either the AutoIncrement property, or a code algorithm as the following:

IF NextEntryNo = 0 THEN BEGIN
  ExLedgEntry.LOCKTABLE;
  IF ExLedgEntry.FINDLAST THEN
    NextEntryNo := ExLedgEntry."Entry No.";
    NextEntryNo := NextEntryNo + 1;
  END;

WITH ExLedgEntry DO
  "Entry No." := NextEntryNo;

The following diagram explains how to implement the Entry Pattern:

Technical description

Entry tables contain reference fields to other tables, often Master Data or Documents, for which they determine things such as balances.

The Entry Table types

In Microsoft Dynamics NAV, we differentiate between the historical and temporary entries.

Historical entries

Historical entries are created using Journals, and are tightly connected to registers. If they can be deleted, such as the reservation entries, they are managed using a clean-up algorithm that ensures balances. We can find Historical Entries using the Navigate API, as they are typically related to Master Data and Documents.

Temporary entries

There are a number of ways to get temporary entries in the system. One of them is using the flow field metadata, as discussed in Chapter 1, Introduction to Patterns and Software Architecture. Flow fields are designed to calculate totals, based on the table fields and flow filters. However, this process can also be reversed.

When we validate a flow field a delta entry is created, based on the filter values to ensure that the totals match the new total value.

This is used in the Budgeting pages that we can find with the following diagram:

Temporary entries

Entries that can be deleted

When the business case requires the possibility of deleting entries, we can make the auditability less strict. We still need code to create the entries, but if they are not used for accounting purposes, users have the option of deleting them again, or changing the contents.

An example of this can be found in Relationship Management, in the following diagram:

Entries that can be deleted

Temporary tracking buckets

In some cases, we need tables to track data during the existence of a Document or Process in the system. We can use Entry Pattern for this in combination with a set of Codeunits that ensure data integrity, and ensure having contracts to the application areas where the data is required.

An example of implementing entries can be found in the application area Reservation Entries. Each application area, such as Sales or Purchase has a Codeunit entry for the Reservation Engine. The Reservation Engine consists of three Codeunits. The following diagram explains the structure:

Temporary tracking buckets

Implementations

There are over 75 implementations of Entry Pattern, varying from the accounting areas like General Ledger and Inventory, to the Flow Field implementations in Budgeting.

Other examples are Job Queue Entries, and Change Log Entries.

Examples

This is a subset of tables using Entry Pattern in Microsoft Dynamics NAV:

Table ID

Description

17

The G/L Entry

96

The G/L Budget Entry

337

The Reservation Entry

405

The Change Log Entry

Note

Not all the tables in Microsoft Dynamics NAV that have the text "Entry" use Entry Pattern. The Document Entry table is an example that does not follow the pattern.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset