Data Validation Rules

WATCH THE VIDEO

As a user of Microsoft Dynamics NAV you can manage data validation directly in the system. 

Use the Data Validation Rules window to manage validation rules of the appropriate tables and related fields. This window can be used to configure validation rules which affect data retrieving. For instance, you can configure validation rules which define if an item is orderable or a customer is allowed to order. Only data which satisfies the selected criteria can be processed.

To open the Data Validation Rules window click: Webshop > Lists > Data Validation Rules.

To add a data validation rule, create a new record in the Data Validation Rules window.

The tables below provide description for the controls in the Data Validation Rule form.

General FastTab

Field

Description

Table No.

The table for which the data validation rules should be set. All existing in the database tables are available.

Table Name

The table name which is selected in the Table No. dropdown list.

Enable Validation Tests

Use this checkbox to enable or disable data validation rules of the selected table.

Lines FastTab

Field

Description

Field Name

The related table field for which the data validation rule should be set. All fields of the related table are available.

Method

An operator that indicates a specific data validation expression.
The combination of method and value defines the validation rule for the related table field.

Value

The available field values.

Error Text

The error message of the related validation rule which will be shown if some data does not pass validation.

The error messages are predefined but it is possible to overwrite them.

The following error messages are also used to show the non-orderable reason of an item in the Webshop Catalog Overview window.

Priority

The priority of the validation rules. The related table fields will be checked in the order set by priority.

NOTE

There is the Custom Function method. By registering custom functions in the SC - Validation codeunit Microsoft Dynamics NAV developers can create more complex data validation rules.

 

NOTE

If the changes made in the Data Validation Rules window influenced the webshop catalog overview, for instance information about items orderability, refreshing of the webshop catalog information may be required. In this case you will see a message.

Use Set Defaults for the current table or Set All Rules Defaults for all tables to restore the default data validation rules.