Quantcast
Channel: Forum CRM Development
Viewing all articles
Browse latest Browse all 1000

Trying to create a record using soap logger crm 2011?

$
0
0

Unable to create a record using soap Logger.i'm calling this soap onLoad Event. Here is My Code. where did i'm wrong.could anybody help me on this.

function getSoapRequest() {

    debugger;
    var request = ["<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 i:type='a:CreateRequest' 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>Target</b:key>","<b:value i:type='a:Entity'>","<a:Attributes>","<a:KeyValuePairOfstringanyType>","<b:key>name</b:key>","<b:value i:type='c:string' xmlns:c='TEST1http://www.w3.org/2001/XMLSchema'>TEST1</b:value>","</a:KeyValuePairOfstringanyType>","<a:KeyValuePairOfstringanyType>","<b:key>address1_city</b:key>","<b:value i:type='c:string' xmlns:c='NewYorkhttp://www.w3.org/2001/XMLSchema'>NewYork</b:value>","</a:KeyValuePairOfstringanyType>","</a:Attributes>","<a:EntityState i:nil='true'/>","<a:FormattedValues/>","<a:Id>00000000-0000-0000-0000-000000000000</a:Id>","<a:LogicalName>account</a:LogicalName>","<a:RelatedEntities />","</b:value>","</a:KeyValuePairOfstringanyType>","</a:Parameters>","<a:RequestId i:nil='true' />","<a:RequestName>Create</a:RequestName>","</request>","</Execute>","</s:Body>","</s:Envelope>"];


    var req = new XMLHttpRequest();
    req.open("POST", "http://mscrmserver2011:5555/Retail/XRMServices/2011/Organization.svc/web", true);
    req.setRequestHeader("Accept", "application/xml, text/xml, */*");
    req.setRequestHeader("Content-Type", "text/xml; charset=utf-8");
    req.setRequestHeader("SOAPAction", "http://schemas.microsoft.com/xrm/2011/Contracts/Services/IOrganizationService/Execute");
    req.send(request);
}


hsk srinivas


Viewing all articles
Browse latest Browse all 1000

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>