RSS

Tag Archives: actions

SOAP Requests parameters for actions in CRM 2013

When you are trying to reach actions in CRM 2013 from javascript the request looks like this

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
  <s:Body>
    <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">
        <!-- List of parameters -->
        </a:Parameters>
        <a:RequestId i:nil="true" />
        <a:RequestName>new_myactivity</a:RequestName>
      </request>
    </Execute>
  </s:Body>
</s:Envelope>

Each parameter looks like this

String

<a:KeyValuePairOfstringanyType>
  <b:key>lastname</b:key>
  <b:value i:type="c:string" xmlns:c="http://www.w3.org/2001/XMLSchema">Smith</b:value>
<a:KeyValuePairOfstringanyType>

Boolean

<a:KeyValuePairOfstringanyType>
  <b:key>updateoriginator</b:key>
  <b:value i:type="c:boolean" xmlns:c="http://www.w3.org/2001/XMLSchema">true</b:value>
</a:KeyValuePairOfstringanyType>

Int

<a:KeyValuePairOfstringanyType>
  <b:key>Number</b:key>
  <b:value i:type="c:int" xmlns:c="http://www.w3.org/2001/XMLSchema">10</b:value>
</a:KeyValuePairOfstringanyType>

Datetime

<a:KeyValuePairOfstringanyType>
  <b:key>birthdate</b:key>
  <b:value i:type="c:dateTime" xmlns:c="http://www.w3.org/2001/XMLSchema">2013-10-27T01:08:29.0439804+03:00</b:value
</a:KeyValuePairOfstringanyType>

Optionset

<a:KeyValuePairOfstringanyType>
  <b:key>Status</c:key>
  <b:value i:type=\"a:OptionSetValue\">
    <a:Value>1</a:Value>
  </b:value>
</a:KeyValuePairOfstringanyType>

Lookup

<a:KeyValuePairOfstringanyType>
  <b:key>Target</b:key>
  <b:value i:type=\"a:EntityReference\">
    <a:Id>1B4A86F7-CCC5-4D3E-B486-5E7CF66EC700</a:Id>
    <a:LogicalName>incident</a:LogicalName>";
    <a:Name i:nil=\"true\" />
  </b:value>
</a:KeyValuePairOfstringanyType>

Money

<a:KeyValuePairOfstringanyType>
  <b:key>DecimalInArgument</b:key>
  <b:value i:type='a:Money'>
    <a:Value>1</a:Value>
  </b:value>
</a:KeyValuePairOfstringanyType>
 
2 Comments

Posted by on December 4, 2013 in CRM 2013, Javascript

 

Tags: , ,