Microsoft Dynamic CRM 2016 / 2015 / 2013 / 2011 SOAP XML
Microsoft Dynamic CRM 2016 / 2015 / 2013 / 2011 SOAP XML
Dear Friends,
Today I have been ask to help for create record in CRM from JAVA using SOAP.
We have facing issue to create SOAP XML with different type.
Kindly find below SOAP create request.
Please shoot the question in below comment if you have any.
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ser="http://schemas.microsoft.com/xrm/2011/Contracts/Services"
xmlns:con="http://schemas.microsoft.com/xrm/2011/Contracts"
xmlns:sys="http://schemas.datacontract.org/2004/07/System.Collections.Generic"
xmlns:i="http://www.w3.org/2001/XMLSchema-instance"
xmlns:c="http://www.w3.org/2001/XMLSchema">
<soapenv:Body>
<ser:Create>
<ser:entity>
<con:Attributes>
<!-- STRING DATATYPE-->
<con:KeyValuePairOfstringanyType>
<sys:key>name</sys:key>
<sys:value i:type="c:string">DM Testing 3</sys:value>
</con:KeyValuePairOfstringanyType>
<!-- LOOKUP DATATYPE-->
<con:KeyValuePairOfstringanyType>
<sys:key>parentaccountid</sys:key>
<sys:value i:type="con:EntityReference">
<con:Id>1F9D4AE0-1A41-E511-9420-0050568469E5</con:Id>
<con:LogicalName>account</con:LogicalName>
<con:Name i:nil="true"/>
</sys:value>
</con:KeyValuePairOfstringanyType>
<!-- DATETIME DATATYPE-->
<con:KeyValuePairOfstringanyType>
<sys:key>estimatedclosedate</sys:key>
<sys:value i:type="c:dateTime">2015-12-12T09:56:00</sys:value>
</con:KeyValuePairOfstringanyType>
<!-- MONEY (CURRENCY) DATATYPE-->
<con:KeyValuePairOfstringanyType>
<sys:key>cbg_projectedspend</sys:key>
<sys:value i:type="con:Money">
<con:value>1000</con:value>
</sys:value>
</con:KeyValuePairOfstringanyType>
<!-- OPTIONSET DATATYPE-->
<con:KeyValuePairOfstringanyType>
<sys:key>cbg_leadtype</sys:key>
<sys:value i:type="con:OptionSetValue">
<con:value>863960005</con:value>
</sys:value>
</con:KeyValuePairOfstringanyType>
<!-- TWO OPTIONS SET DATATYPE-->
<con:KeyValuePairOfstringanyType>
<sys:key>cbg_cancellableswap</sys:key>
<sys:value i:type="c:boolean">false</sys:value>
</con:KeyValuePairOfstringanyType>
</con:Attributes>
<con:LogicalName>opportunity</con:LogicalName>
</ser:entity>
</ser:Create>
</soapenv:Body>
</soapenv:Envelope>
Dear Friends,
Today I have been ask to help for create record in CRM from JAVA using SOAP.
We have facing issue to create SOAP XML with different type.
Kindly find below SOAP create request.
Please shoot the question in below comment if you have any.
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ser="http://schemas.microsoft.com/xrm/2011/Contracts/Services"
xmlns:con="http://schemas.microsoft.com/xrm/2011/Contracts"
xmlns:sys="http://schemas.datacontract.org/2004/07/System.Collections.Generic"
xmlns:i="http://www.w3.org/2001/XMLSchema-instance"
xmlns:c="http://www.w3.org/2001/XMLSchema">
<soapenv:Body>
<ser:Create>
<ser:entity>
<con:Attributes>
<!-- STRING DATATYPE-->
<con:KeyValuePairOfstringanyType>
<sys:key>name</sys:key>
<sys:value i:type="c:string">DM Testing 3</sys:value>
</con:KeyValuePairOfstringanyType>
<!-- LOOKUP DATATYPE-->
<con:KeyValuePairOfstringanyType>
<sys:key>parentaccountid</sys:key>
<sys:value i:type="con:EntityReference">
<con:Id>1F9D4AE0-1A41-E511-9420-0050568469E5</con:Id>
<con:LogicalName>account</con:LogicalName>
<con:Name i:nil="true"/>
</sys:value>
</con:KeyValuePairOfstringanyType>
<!-- DATETIME DATATYPE-->
<con:KeyValuePairOfstringanyType>
<sys:key>estimatedclosedate</sys:key>
<sys:value i:type="c:dateTime">2015-12-12T09:56:00</sys:value>
</con:KeyValuePairOfstringanyType>
<!-- MONEY (CURRENCY) DATATYPE-->
<con:KeyValuePairOfstringanyType>
<sys:key>cbg_projectedspend</sys:key>
<sys:value i:type="con:Money">
<con:value>1000</con:value>
</sys:value>
</con:KeyValuePairOfstringanyType>
<!-- OPTIONSET DATATYPE-->
<con:KeyValuePairOfstringanyType>
<sys:key>cbg_leadtype</sys:key>
<sys:value i:type="con:OptionSetValue">
<con:value>863960005</con:value>
</sys:value>
</con:KeyValuePairOfstringanyType>
<!-- TWO OPTIONS SET DATATYPE-->
<con:KeyValuePairOfstringanyType>
<sys:key>cbg_cancellableswap</sys:key>
<sys:value i:type="c:boolean">false</sys:value>
</con:KeyValuePairOfstringanyType>
</con:Attributes>
<con:LogicalName>opportunity</con:LogicalName>
</ser:entity>
</ser:Create>
</soapenv:Body>
</soapenv:Envelope>
Comments
Post a Comment