User GuideNAV Specific

NAV Specific

Sana Commerce 8.2
Your provider

Data Validation Rules

Microsoft Dynamics NAV administrators can manage data validation directly in MS Dynamics NAV.

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:


Data Validation Rules

To add a data validation rule create a new record in the 'Data Validation Rules' window:


Data Validation Rules of the 'Item' Table

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.
Enable Validation Tests Use this check box to enable/ disable data validation rules of the table.

Lines FastTab:

Field Description
Field Name The related table filed 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 filed 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' form.

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

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.

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.

User GuideNAV Specific