Use action rules to set field values in D365 F&SCM.

To set a field value, you can use several action types. This topic explains how to set up an action rule of type Web service.
Use a web service action rule to get a field value from another internal or external source, using a web service, and set this value in the target field of the action rule.
Before you can set up a web service action rule, set up the web service to be used.


Data quality administrator Data quality administrator The data quality administrator (DQSDataQualityAdministrator) can set up and maintain: Data quality policies Data quality studio parameters Data quality studio general setup Start Start Set up web service configuration

Set up web service configuration

You can set up data quality policy rules that use a web service.

You can use a web service:

  • Validation rule to validate if a field value matches a value in another internal or external source, using a web service.
  • Enrichment rule to get a field value from another internal or external source, using a web service, and set this value in the target field of the enrichment rule.
  • Action rule to get a field value from another internal or external source, using a web service, and set this value in the target field of the enrichment rule.
Before you can set up a web service rule, set up the web service configuration to be used.

Set up action rule of type Web service Set up action rule of type Web service Use action rules to set field values in D365 F&SCM. To set a field value, you can use several action types. This topic explains how to set up an action rule of type Web service. Use a web service action rule to get a field value from another internal or external source, using a web service, and set this value in the target field of the action rule. Before you can set up a web service action rule, set up the web service to be used. You can set up a web service action rule in several ways. For a parameter of type: Request, you can use the default parameter values as defined for the used web service. No specific parameter setup is required. Request, you can override a default parameter value for a request parameter. To do so, you can use one of these types: Field, Code, or Fixed value. Each type requires specific settings. Explained in subtasks 13-14. Response, you can use the values, as returned by the web service, to set several values in D365 F&SCM. Explained in subtask 15. Response, you can process a response value, as returned by the web service, before you use it to set a value in D365 F&SCM. Explained in subtask 16. 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 Add. 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 'Web service'. 8. In the Source field field, enter or select a value. 9. In the Target field field, enter or select a value. 10. On the Properties tab, in the Web service field, enter or select the desired web service. 11. Define the response parameter which value is used: - To set the value of the target field, if the Override setup check box is cleared. - As input for the custom method, if the Override setup check box is selected. On the Properties tab, in the Action response parameter field, enter or select a value. Note: This field is not applicable if a Custom response handler is defined for the web service. 12. Sub-task: Set up a request parameter override of type Field. 13. For a web service, parameters can be set up. If so, these parameters are shown on the Properties tab. For Request parameters, a default value can be defined. You can override this default value with the value of a field. If no default value is defined, do the same steps to define the request parameter value. On the Properties tab, for the desired Request parameter, select the Override setup check box. Note: If a Custom request handler is defined for the web service, no Request parameters are available. 14. In the Parameter type field, select 'Field'. 15. In the Field name field, enter or select a value. Note: You can only select a field from the table that is defined for the validation rule. 16. Sub-task: Set up a request parameter override of type Custom. 17. For a web service, parameters can be set up. If so, these parameters are shown on the Properties tab. For Request parameters, a default value can be defined. You can override this default value with a value that is defined by a custom method. If no default value is defined, do the same steps to define the request parameter value. On the Properties tab, for the desired Request parameter, select the Override setup check box. Note: If a Custom request handler is defined for the web service, no Request parameters are available. 18. In the Parameter type field, select 'Code'. 19. Define the custom class that is used to define the parameter value. In the Class name field, enter or select a value. Note: You can only select classes that extend the DQSWebServiceParametersBase base class. This custom class must have a return method that returns a value. 20. In the Method name field, enter or select a value. 21. Sub-task: Set up a request parameter override of type Fixed value. 22. For a web service, parameters can be set up. If so, these parameters are shown on the Properties tab. For Request parameters, a default value can be defined. You can override this default value with a fixed value. If no default value is defined, do the same steps to define the request parameter value. On the Properties tab, for the desired Request parameter, select the Override setup check box. Note: If a Custom request handler is defined for the web service, no Request parameters are available. 23. In the Parameter type field, select 'Fixed value'. 24. In the Parameter value field, type a value. 25. Sub-task: Set up web service response actions. 26. For a parameter of type Response, use the values, as returned by the web service, to set several values in D365 F&SCM. You can map each parameter of the web service response to the applicable target field or several target fields in D365 F&SCM. On the Properties tab, in the Web service response actions section, click Add. Note: - A web service response action is only applied if, for the parameter, the Override setup check box is cleared. - For response parameters, the Target field of the action rule is not used. 27. In the Parameter name field, enter or select a value. 28. In the Target field field, enter or select a value. 29. Sub-task: Set up response parameter override. 30. For a web service, parameters can be set up. If so, these parameters are shown on the Properties tab. You can process a Response value, as received from the web service, before you use it to set a value in the target field of the action rule. You can only do so with a custom class and method. When the action rule is applied, the process is: 1. Send request to web service. 2. Web service gives a response. 3. Process response with custom method. 4. Get response value from custom method. 5. Set response value in the target field. If the Override setup check box is cleared, steps 3 and 4 are skipped. On the Properties tab, for the desired Response parameter, select the Override setup check box. Note: - Select this check box only for the response parameter as defined in the Action response parameter field. - If a Custom response handler is defined for the web service, no Response parameters are available. 31. Define the custom class that is used to process the web service response and that returns the value to be set in the target field of the action rule. In the Class name field, enter or select a value. Note: You can only select classes that extend the DQSWebServiceParametersBase base class. This custom class must have a return method that returns a value. 32. In the Method name field, enter or select a value. 33. Close the page. End End

Activities

Name Responsible Description

Set up web service configuration

Data quality administrator

You can set up data quality policy rules that use a web service.

You can use a web service:

  • Validation rule to validate if a field value matches a value in another internal or external source, using a web service.
  • Enrichment rule to get a field value from another internal or external source, using a web service, and set this value in the target field of the enrichment rule.
  • Action rule to get a field value from another internal or external source, using a web service, and set this value in the target field of the enrichment rule.
Before you can set up a web service rule, set up the web service configuration to be used.

Set up action rule of type Web service

Data quality administrator

Use action rules to set field values in D365 F&SCM.

To set a field value, you can use several action types. This topic explains how to set up an action rule of type Web service.
Use a web service action rule to get a field value from another internal or external source, using a web service, and set this value in the target field of the action rule.
Before you can set up a web service action rule, set up the web service to be used.
You can set up a web service action rule in several ways. For a parameter of type:
  • Request, you can use the default parameter values as defined for the used web service. No specific parameter setup is required.
  • Request, you can override a default parameter value for a request parameter. To do so, you can use one of these types: Field, Code, or Fixed value. Each type requires specific settings. Explained in subtasks 13-14.
  • Response, you can use the values, as returned by the web service, to set several values in D365 F&SCM. Explained in subtask 15.
  • Response, you can process a response value, as returned by the web service, before you use it to set a value in D365 F&SCM. Explained in subtask 16.

See also

Provide feedback