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:
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...