Use action rules to set field values in D365 FO.
To set a field value, you can use several action types. This topic explains how to set up an action rule of type Data query.

Use a data query action rule to find a value using a query and set the found value in the target field of the action rule.
You can use these types of queries:
  • Inquiry: Use the standard D365 FO Inquiry (SysQueryForm) page to define the query that is used to find the value to be set in the target field. The inquiry only queries the table as defined for the action rule.
  • Dynamic query: Use a dynamic query to define the query that is used to find the value to be set in the target field. Before you can set up an action rule 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 action rule table, to define table relations, and to have only one record or value returned.

Data quality administrator Data quality administrator Start Start Need new or changed  custom query? Need new or changed  custom query? Set up query

Set up dynamic queries

Use a dynamic query to find one or more records in the database. The found records are the input for further processing.

You can use a dynamic query on:

  • An action rule of type Data query.
  • A condition that is applied to a validation rule, duplicate check rule, or action rule.
  • A configurable lookup of type Dynamic query. You can apply the configurable lookup on a validation rule of type Configurable lookup.

To define a query range, you can use a function.

Set up action rule of type Data query Set up action rule of type Data query Use action rules to set field values in D365 FO. To set a field value, you can use several action types. This topic explains how to set up an action rule of type Data query. Use a data query action rule to find a value using a query and set the found value in the target field of the action rule. You can use these types of queries: Inquiry: Use the standard D365 FO Inquiry (SysQueryForm) page to define the query that is used to find the value to be set in the target field. The inquiry only queries the table as defined for the action rule. Dynamic query: Use a dynamic query to define the query that is used to find the value to be set in the target field. Before you can set up an action rule 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 action rule table, to define table relations, and to have only one record returned. 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 the Action rules tab. 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. Click New. 5. In the Table field, enter or select a value. 6. In the Event field, select an option. 7. In the Action type field, select 'Data query'. 8. In the Source field field, enter or select a value. 9. In the Target field field, enter or select a value. 10. Sub-task: Use query of type Dynamic query. 11. On the Properties tab, in the Query type field, select 'Dynamic query'. 12. Usually the dynamic query is already set up. Select the applicable dynamic query. In the Query field, enter or select a value. Note: If selected, you can review or edit the query by clicking Edit query. 13. Define the table of the field in the dynamic query which value must be set in the target field. In the Result table name field, enter or select a value. Note: - Define a table that exists in the dynamic query. - The table can be another table than the one that you defined for the action rule. 14. Define the field in the query which value must be set in the target field. In the Result field field, enter or select a value. Note: - Define a field that exists in the dynamic query. - The field can be another field than the target field that you defined for the action rule. - Make sure, the data type of the result field is compatible with the data type of the target field. 15. Sub-task: Use query of type Inquiry. 16. On the Properties tab, in the Query type field, select 'Inquiry'. 17. You must edit the inquiry. At least, enter a query value in the Criteria field. Click Edit query. Note: You can extend the inquiry setup as desired. 18. Click OK. 19. Define the table of the field in the inquiry which value must be set in the target field. In the Result table name field, enter or select a value. Note: - Define a table that exists in the inquiry. - The table can be another table than the one that you defined for the action rule. 20. Define the field in the inquiry which value must be set in the target field. In the Result field field, enter or select a value. Note: - Define a field that exists in the inquiry. - The field can be another field than the target field that you defined for the action rule. - Make sure, the data type of the result field is compatible with the data type of the target field. 21. Close the page. End End Yes No

Activities

Name Responsible Description

Set up dynamic queries

Data quality administrator

Use a dynamic query to find one or more records in the database. The found records are the input for further processing.

You can use a dynamic query on:

  • An action rule of type Data query.
  • A condition that is applied to a validation rule, duplicate check rule, or action rule.
  • A configurable lookup of type Dynamic query. You can apply the configurable lookup on a validation rule of type Configurable lookup.

To define a query range, you can use a function.

Set up action rule of type Data query

Data quality administrator

Use action rules to set field values in D365 FO.
To set a field value, you can use several action types. This topic explains how to set up an action rule of type Data query.

Use a data query action rule to find a value using a query and set the found value in the target field of the action rule.
You can use these types of queries:
  • Inquiry: Use the standard D365 FO Inquiry (SysQueryForm) page to define the query that is used to find the value to be set in the target field. The inquiry only queries the table as defined for the action rule.
  • Dynamic query: Use a dynamic query to define the query that is used to find the value to be set in the target field. Before you can set up an action rule 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 action rule table, to define table relations, and to have only one record returned.

Activities

Name Responsible Description

Set up dynamic queries

Data quality administrator

Use a dynamic query to find one or more records in the database. The found records are the input for further processing.

You can use a dynamic query on:

  • An action rule of type Data query.
  • A condition that is applied to a validation rule, duplicate check rule, or action rule.
  • A configurable lookup of type Dynamic query. You can apply the configurable lookup on a validation rule of type Configurable lookup.

To define a query range, you can use a function.

Set up action rule of type Data query

Data quality administrator

Use action rules to set field values in D365 FO.
To set a field value, you can use several action types. This topic explains how to set up an action rule of type Data query.

Use a data query action rule to find a value using a query and set the found value in the target field of the action rule.
You can use these types of queries:
  • Inquiry: Use the standard D365 FO Inquiry (SysQueryForm) page to define the query that is used to find the value to be set in the target field. The inquiry only queries the table as defined for the action rule.
  • Dynamic query: Use a dynamic query to define the query that is used to find the value to be set in the target field. Before you can set up an action rule 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 action rule table, to define table relations, and to have only one record returned.

Provide feedback