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 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 Developer Developer Start Start Need a new custom  request or response  handler class? Need a new custom  request or response  handler class? Inform the developer on the  request or response handler  class to be developed Inform the developer on the  request or response handler  class to be developed Develop custom response or request handler class Develop custom response or request handler class   For a web service, you can use a custom class to define the: Request that you send to the web service. You can, for example, use a custom class to add some binary code or other logic to the web service request. Use the PostData method to define web service requests. Response that you expect from the web service. You can, for example, use a custom class to add some binary code or other logic to the web service response. Use the parseResponse method to define web service response. The custom class must extend the DQSWebServiceCustomFormatBase base class. Inform the data quality  administrator that the request  or response handler class  is available Inform the data quality  administrator that the request  or response handler class  is available Need new web service? Need new web service? Set up web service Set up web service You can use a web service in:A validation rule to validate if a field value matches a value in another internal or external source.An action rule to fill a field value with a value from another internal or external source.To set up a web service validation rule or action rule, first set up the web service to be used.You can find most of the required values to be set for the web service in the technical documentation as shared by the web service provider. Procedure 1. Click Data quality management. 2. Click Web services. 3. Click New. 4. In the Web service field, type a value. 5. In the Description field, type a value. 6. In the Web Service URL field, enter the URL of the web service. 7. In the Certificate field, enter or select a value. 8. Sub-task: Define web service settings. 9. Expand the Settings section. 10. In the Request method field, type a value. 11. In the Content type field, type a value. 12. You can use a custom class to define the request that you send to the web service. You can, for example, use a custom class to add some binary code or other logic to the web service request. The custom class must extend the DQSWebServiceCustomFormatBase base class. Use the PostData method to define web service requests. In the Custom request handler field, enter or select a value. Note: - You can use a custom class both for SOAP and non-SOAP. - In the lookup of this field, only the classes are shown that extend the DQSWebServiceCustomFormatBase base class. - You can use the same custom class for request and response. - If you use a custom class in the Request data provider field, the Input parameters must be defined in the custom class. So, you cannot define Input parameters for the web service. 13. In the Accept field, type a value. 14. In the Accept encoding field, type a value. 15. You can use a custom class to define the response that you expect from the web service. You can, for example, use a custom class to add some binary code or other logic to the web service response. The custom class must extend the DQSWebServiceCustomFormatBase base class. Use the parseResponse method to define web service response. In the Custom response handler field, enter or select a value. Note: - You can use a custom class both for SOAP and non-SOAP. - In the lookup of this field, only the classes are shown that extend the DQSWebServiceCustomFormatBase base class. - You can use the same custom class for request and response. - If you use a custom class in the Response parser field, the Output parameters must be defined in the custom class. So, you cannot define Output parameters for the web service. 16. Select Yes in the Use SOAP envelope field. 17. If the web service access type is SOAP, enter the required SOAP segments and schema as provided by the web service. Also enter the parameters in the message body. If you send a request, the parameter values are added to the parameters in the body in the message pattern. In the Message pattern field, type a value. Note: - You can only define a message pattern if the content type is 'application/xml'. - Make sure to define the request parameters in the Parameters section or in the Custom request handler. 18. Sub-task: Define web service parameters. 19. Every web service requires parameters. The parameters define the web service values that are used to validate or set a D365 FO value. Expand the Parameters section. Note: - If you use a custom handler for the request or response, the parameters must be defined in the custom handler. - If the web service: - Uses SOAP, the parameter values are added to the parameters in the body in the message pattern. - Does not use SOAP, the parameters and parameter values are added to the web service URL. 20. Click New. 21. In the Parameter name field, type a value. 22. Define when the parameter is applied: - Request: Defines what you send to the web service. So, it is the input for the web service. - Response: Defines what you get from the web service. So, it is the output from the web service. In the Direction field, select an option. Note: If you have defined a: - Custom request handler, you cannot set up Request parameters. - Custom response handler, You cannot set up Response parameters. 23. In the Parameter value field, type a value. 24. You can use secured values to store secrets at a central place in Data quality studio. You can, for example, set up a secured value for a license key or access token. You can use a secured value as a request parameter value to get access to a web service. In the Secured value field, enter or select the desired secured value. Note: - Use secured values only for parameters with the direction 'Request'. - If you use a secured value, do no fill in the Parameter value field. 25. If the web service type is SOAP, in a web service message, a parameter can be used several times in different locations. You can use a path expression to define the exact location in the web service message to enter or find applicable value. In the Path expression field, type a value. Note: You can only define a path expression if the content type is 'application/xml'. 26. Sub-task: Make web service active. 27. If the web service setup is completed, you can make the web service active. As a result, it becomes available for selection for validation rules and action rules. Select Yes in the Active field. Note: If active and used in an active data quality policy version, you cannot make the web service inactive. 28. Close the page. Need new custom  parameter value class? Need new custom  parameter value class? Inform the developer on  the parameter value class  to be developed Inform the developer on  the parameter value class  to be developed Develop custom parameter value class Develop custom parameter value class To define a web service parameter value, you can use a custom class to return a parameter value.You can use a custom parameter value class to return web service parameters for validation rules and action rules of type Web service. The custom parameter value class must extend the DQSWebServiceParametersBase base class. This custom class must have at least one return method that returns a value. Inform the data quality  administrator that the  parameter value class  is available Inform the data quality  administrator that the  parameter value class  is available 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 FO. 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 the type 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 FO. 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 FO. 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 FO. You can map each parameter of the web service response to the applicable target field or several target fields in D365 FO. 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 Yes No Yes No Yes No

Activities

Name Responsible Description

Develop custom response or request handler class

Developer

 

For a web service, you can use a custom class to define the:
  • Request that you send to the web service. You can, for example, use a custom class to add some binary code or other logic to the web service request. Use the PostData method to define web service requests.
  • Response that you expect from the web service. You can, for example, use a custom class to add some binary code or other logic to the web service response. Use the parseResponse method to define web service response.
The custom class must extend the DQSWebServiceCustomFormatBase base class.

Set up web service for Data quality studio

Data quality administrator

You can use a web service in:
  • A validation rule to validate if a field value matches a value in another internal or external source.
  • An action rule to fill a field value with a value from another internal or external source.
To set up a web service validation rule or action rule, first set up the web service to be used.
You can find most of the required values to be set for the web service in the technical documentation as shared by the web service provider.

Develop custom parameter value class

Developer

To define a web service parameter value, you can use a custom class to return a parameter value.
You can use a custom parameter value class to return web service parameters for validation rules and action rules of type Web service. 
The custom parameter value class must extend the DQSWebServiceParametersBase base class. This custom class must have at least one return method that returns a value.

Set up action rule of type Web service

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 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 the type 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 FO. 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 FO. Explained in subtask 16.

Activities

Name Responsible Description

Develop custom response or request handler class

Developer

 

For a web service, you can use a custom class to define the:
  • Request that you send to the web service. You can, for example, use a custom class to add some binary code or other logic to the web service request. Use the PostData method to define web service requests.
  • Response that you expect from the web service. You can, for example, use a custom class to add some binary code or other logic to the web service response. Use the parseResponse method to define web service response.
The custom class must extend the DQSWebServiceCustomFormatBase base class.

Set up web service for Data quality studio

Data quality administrator

You can use a web service in:
  • A validation rule to validate if a field value matches a value in another internal or external source.
  • An action rule to fill a field value with a value from another internal or external source.
To set up a web service validation rule or action rule, first set up the web service to be used.
You can find most of the required values to be set for the web service in the technical documentation as shared by the web service provider.

Develop custom parameter value class

Developer

To define a web service parameter value, you can use a custom class to return a parameter value.
You can use a custom parameter value class to return web service parameters for validation rules and action rules of type Web service. 
The custom parameter value class must extend the DQSWebServiceParametersBase base class. This custom class must have at least one return method that returns a value.

Set up action rule of type Web service

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 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 the type 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 FO. 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 FO. Explained in subtask 16.

See also

Provide feedback