Use validation rules to check if the data is in line with the defined standards.
To validate data, you can use several validation types. This flow explains how to set up a validation rule of type 'Query'.
Use a query validation rule to validate if an entered field value is allowed using a dynamic query. Using a dynamic query, you can validate the field value based on one or more field values in another table.
Examples of validations where you can apply a query validation rule:
On creating a sales order, check if address information or contact information is defined for the selected customer. If no address or contact information is defined, the customer cannot be used on a sales order.
On the worker setup, for the worker position, a cost center can be defined in the 'Cost center' financial dimension. Validate if the defined cost center is active. If not active, a warning or error message is given for the worker.
On terminating an employee, check if positions are reporting to the employee. If positions are still reporting to the employee, you cannot terminate the employee.
Before you can set up a query validation rule, set up the dynamic query to be used.
For each validation rule, you can set up:
A validation message that is shown if the validation rule is not met.
Conditions to define the data to which the rule applies.
Flow diagram
Note
In the flow diagram, clicking:
‘Set up dynamic queries’ opens the corresponding section under ‘General setup’.
‘Set up validation rule conditions’ opens the corresponding section under ‘Set up validation rules’.