Oklahoma Finance

Jun 22 2018

Call a Dynamics CRM 2016 Custom Action Using SOAP UI – Dynamics 365 Blog

#crm #configuration


#

Call a Dynamics CRM 2016 Custom Action Using SOAP UI

Call a Dynamics CRM 2016 Custom Action Using SOAP UI

This guide provides step by step instructions on how to call a Dynamics CRM custom action via SOAP UI. The complete process can be broken down into the following three overarching sub-steps:

  • Creating the custom action in CRM
  • Extracting the SOAP request message and applicable SOAP headers
  • Calling the custom action using SOAP UI

Step 1: Create the custom action

We will be creating a simple custom action that takes in a single parameter (InArgument) and returns the same value as an output value (OutArgument).

  1. In Dynamics CRM, create a new process with a category of “Action” with the following attributes:
    • Process name: Custom Action
    • Category: Action
    • Entity: None (global)

  1. Press OK
  2. Create both an input and output argument as follows:
    1. Name: InArgument
      1. Type: String
      2. Required: Required
      3. Direction: Input
    2. Name: OutArgument
      1. Type: String
      2. Required: Required
      3. Direction: Output
  3. Create an “Assign Value” workflow step and populate the OutArgument with the InArgument as follows:

Step 2: Extract the SOAP request message and applicable SOAP headers

Pre-step: Ensure you have downloaded the Dynamics CRM SDK as there is a tool (project) included in it that will generate the SOAP request.

  1. In the CRM SDK extract folder, there is a solution named “SOAPLogger”. The exact location (assuming you have extracted the SDK to the folder “C:\CRM 2016 SDK”) is:

  1. Open the solution file, then go to the file “SOAPLogger.cs” and make a call to the custom action using the SoapLoggerOrganizationService as shown highlighted below:

Execute xmlns = “http://schemas.microsoft.com/xrm/2011/Contracts/Services” xmlns. i = “http://www.w3.org/2001/XMLSchema-instance”

request xmlns. a = “http://schemas.microsoft.com/xrm/2011/Contracts”

a. Parameters xmlns. b = “http://schemas.datacontract.org/2004/07/System.Collections.Generic”

a. KeyValuePairOfstringanyType

b. key InArgument / b. key

b. value i. type = “c:string” xmlns. c = “http://www.w3.org/2001/XMLSchema” Some Text / b. value

/ a. KeyValuePairOfstringanyType

/ a. Parameters

a. RequestId i. nil = “true” /

a. RequestName saw_CustomAction / a. RequestName


Written by admin


Leave a Reply

Your email address will not be published. Required fields are marked *