The Rules Pattern

The Microsoft Dynamics NAV EARP application is designed to work for small, medium-sized, and larger businesses. The Rules Pattern enables us to store information in the database with a sliding level of complexity.

Technical description

These tables have a composite Primary Key that has up to 20 fields, limited by the SQL Server or 900 bytes. The value being used in the application is based on rules. These rules are programmed in Codeunits.

The non-Primary Key fields typically determine the values that are being used after applying the rule, although these fields can also be a part of the Primary Key. For example, the selected printer, after filtering on the criteria, is an additional field in the table.

The following diagram explains how to implement the Rules pattern:

Technical description

Implementations

The Rules Pattern is used for the setup tables, and for either pricing or discount information. It is also used to implement a Select Distinct statement; for example, during the posting of Documents.

Note

To learn more about the Select Distinct statement in T-SQL, go to http://www.w3schools.com/sql/sql_distinct.asp.

Examples

In the standard Microsoft Dynamics NAV application, the examples of the usage are as follows:

Table ID

Description

49

Invoice Post. Buffer

78

The Printer Selection

7002

Sales Price

7004

Sales Line Discount

7012

The Purchase Price

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

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