Use validation rules to check if the data is in line with the defined standards.

To validate data, you can use these validation types:
  • Mandatory: Makes it mandatory to fill a field.
  • Blank: Validates if no value is entered in a field.
  • Range expression: Validates if a field value is within a defined range.
  • Data pattern: Validates if a field value matches a data pattern.
  • Web service: Validates if a field value matches a value in another internal or external source, using a web service.
  • Configurable lookup: Adds a custom lookup to a field and validates if the field value matches a value as defined by the configurable lookup.
  • Custom: Validates a field value using a custom validation class.
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.


Data quality administrator Data quality administrator Start Start Which validation  type is used? Which validation  type is used? Set up validation rule of type Mandatory or Blank Set up validation rule of type Mandatory or Blank 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 topic explains how to set up validation rules of these types: Mandatory: Makes it mandatory to fill the defined field. Blank: Validates if no value is entered in a field. Procedure 1. Click Data quality management. 2. On the Data quality policies tab, in the list, click the link of the desired data quality policy. 3. On the Validation rules tab, click Add. Note: If you want to edit another data quality policy version than the currently shown version, first select the desired version. To do so, on the Action Pane, on the Version tab, click Versions. On the dialog, select the desired version and click OK. 4. In the Table field, enter or select a value. 5. In the Field field, enter or select a value. 6. In the Validation type field, select 'Mandatory' or 'Blank'. 7. In the Event field, select an option. 8. Define what is done if the validation rule is not met: - Warning: A warning message is shown. The record or the field value is saved. - Error: An error message is shown. The record or the field value is not saved. In the Warning/Error field, select an option. Note: For each validation rule, you can define a message to be shown. If you do not define a validation rule message, a default message is shown. 9. Close the page. Set up validation rule of type Range expression Set up validation rule of type Range expression 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 topic explains how to set up a validation rule of type Range expression. Use a range expression validation rule to validate if a field value is within a defined range. To define a range expression, you can use a: Fixed value or a range of values using the advanced query syntax. Static method that defines the range. For example, you can use the SysQueryRangeUtil class to apply advanced date queries. For more information on how to define ranges in the Range expression field, refer to Advanced filtering and query syntax. Procedure 1. Click Data quality management. 2. On the Data quality policies tab, in the list, click the link of the desired data quality policy. 3. On the Validation rules tab, click Add. Note: If you want to edit another data quality policy version than the currently shown version, first select the desired version. To do so, on the Action Pane, on the Version tab, click Versions. On the dialog, select the desired version and click OK. 4. In the Table field, enter or select a value. 5. In the Field field, enter or select a value. 6. In the Validation type field, select 'Range expression'. 7. In the Event field, select an option. 8. Define what is done if the validation rule is not met: - Warning: A warning message is shown. The record or the field value is saved. - Error: An error message is shown. The record or the field value is not saved. In the Warning/Error field, select an option. Note: For each validation rule, you can define a message to be shown. If you do not define a validation rule message, a default message is shown. 9. Sub-task: Set the validation rule properties. 10. In the RangeExpression field, enter or select the desired range expression. 11. Close the page. Set up validation rule of type Data pattern

Set up validation rule of type Data pattern

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 the Data pattern validation type.

Use a data pattern validation to validate if a field value matches a defined pattern.
Before you can set up a data pattern validation rule, set up the data pattern to be applied.

Set up validation rule of type Web service

Set up validation rule of type Web service

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 topic explains how to set up the Web service validation type.

Use a web service validation to validate if a field value matches a value in another internal or external source, using a web service.
Before you can set up a web service validation rule, set up the web service to be used.

Set up validation rule of type Configurable lookup

Set up validation rule of type Configurable lookup

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 topic explains how to set up the Configurable lookup validation type.

Use a configurable lookup validation to add a custom lookup to a field and to validate if the field value matches a value as defined by the configurable lookup.

Note: If the field, to which the configurable lookup is applied, already has a lookup, the configurable lookup overwrites the existing lookup.

Before you can set up a configurable lookup validation rule, set up the configurable lookup to be used.

Set up validation rule of type Custom

Set up validation rule of type Custom

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 topic explains how to set up the Custom validation type.
Use a custom validation to validate a field value using a custom validation class.
Before you can set up a custom validation rule, ensure that the custom validation class is developed.

Show message when  validation rule is not met? Show message when  validation rule is not met? Set up validation rule message Set up validation rule message You can define a message that is shown if the validation rule is not met.If no validation rule message is defined, the default message is shown if the validation is not met.In case of a data pattern validation, the applicable data pattern can also have a message defined. In this case, the message priority is:If a validation rule message is defined, this message is shown.If no validation rule message is defined, the data pattern message is shown.If no data pattern message is defined, the default message is shown.You can also enter a description of the validation rule.You can translate both the validation message and the validation rule description. Procedure 1. Click Data quality management. 2. On the Data quality policies tab, in the list, click the link of the desired data quality policy. 3. Click Edit. Note: If you want to edit another data quality policy version than the currently shown version, first select the desired version. To do so, on the Action Pane, on the Version tab, click Versions. On the dialog, select the desired version and click OK. 4. On the Validation rules tab, in the list, find and select the desired validation rule. 5. Click the Messages tab. 6. In the Validation message field, type a value. 7. In the Rule description field, type a value. 8. Sub-task: Translate validation message and description. 9. Click Translations. 10. Click Add to open the drop dialog. 11. In the list, find and select the desired language. 12. Click OK. 13. In the Rule description field, type the translation of the validation rule description. 14. In the Message field, type the translation of the validation message. 15. Close the page. 16. Close the page. Does the validation rule  apply to specific data? Does the validation rule  apply to specific data? Set up validation rule conditions

Set up validation rule conditions

For each validation rule, you can set up conditions. The validation rule is only applied if the conditions are met.

To define a validation rule condition, you use a query. The validation rule is applied only to the records that are found by the query.
You can use these types of queries:
  • Inquiry: Use the standard D365 FO Inquiry (SysQueryForm) page to define the records to which the validation rule applies. The inquiry only queries the table as defined for the validation rule.
  • Dynamic query: Use a dynamic query to define the records to which the validation rule applies. Before you can set up a condition with a dynamic query, set up the dynamic query to be applied. You can use a dynamic query, for example, to query other tables than the validation rule table, to define table relations, and to have only one record returned.

End End Yes No No Yes Mandatory  or Blank Range  expression Data pattern Web service Custom Configurable  lookup

Activities

Name Responsible Description

Set up validation rule of type Mandatory or Blank

Data quality administrator

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 topic explains how to set up validation rules of these types:
  • Mandatory: Makes it mandatory to fill the defined field.
  • Blank: Validates if no value is entered in a field.

Set up validation rule of type Range expression

Data quality administrator

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 topic explains how to set up a validation rule of type Range expression.
Use a range expression validation rule to validate if a field value is within a defined range. To define a range expression, you can use a:
  • Fixed value or a range of values using the advanced query syntax.
  • Static method that defines the range. For example, you can use the SysQueryRangeUtil class to apply advanced date queries.
For more information on how to define ranges in the Range expression field, refer to Advanced filtering and query syntax.

Set up validation rule of type Data pattern

Data quality administrator

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 the Data pattern validation type.

Use a data pattern validation to validate if a field value matches a defined pattern.
Before you can set up a data pattern validation rule, set up the data pattern to be applied.

Set up validation rule of type Web service

Data quality administrator

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 topic explains how to set up the Web service validation type.

Use a web service validation to validate if a field value matches a value in another internal or external source, using a web service.
Before you can set up a web service validation rule, set up the web service to be used.

Set up validation rule of type Configurable lookup

Data quality administrator

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 topic explains how to set up the Configurable lookup validation type.

Use a configurable lookup validation to add a custom lookup to a field and to validate if the field value matches a value as defined by the configurable lookup.

Note: If the field, to which the configurable lookup is applied, already has a lookup, the configurable lookup overwrites the existing lookup.

Before you can set up a configurable lookup validation rule, set up the configurable lookup to be used.

Set up validation rule of type Custom

Data quality administrator

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 topic explains how to set up the Custom validation type.
Use a custom validation to validate a field value using a custom validation class.
Before you can set up a custom validation rule, ensure that the custom validation class is developed.

Set up validation rule message

Data quality administrator

You can define a message that is shown if the validation rule is not met.
If no validation rule message is defined, the default message is shown if the validation is not met.
In case of a data pattern validation, the applicable data pattern can also have a message defined. In this case, the message priority is:
  1. If a validation rule message is defined, this message is shown.
  2. If no validation rule message is defined, the data pattern message is shown.
  3. If no data pattern message is defined, the default message is shown.
You can also enter a description of the validation rule.
You can translate both the validation message and the validation rule description.

Set up validation rule conditions

Data quality administrator

For each validation rule, you can set up conditions. The validation rule is only applied if the conditions are met.
To define a validation rule condition, you use a query. The validation rule is applied only to the records that are found by the query.
You can use these types of queries:
  • Inquiry: Use the standard D365 FO Inquiry (SysQueryForm) page to define the records to which the validation rule applies. The inquiry only queries the table as defined for the validation rule.
  • Dynamic query: Use a dynamic query to define the records to which the validation rule applies. Before you can set up a condition with a dynamic query, set up the dynamic query to be applied. You can use a dynamic query, for example, to query other tables than the validation rule table, to define table relations, and to have only one record returned.

Set up validation rule of type Mandatory or Blank

Set up validation rule of type Range expression

Set up validation rule of type Data pattern

Set up validation rule of type Web service

Set up validation rule of type Configurable lookup

Set up validation rule of type Custom

Set up validation rule conditions

Provide feedback