3. Juni 2011 17:05
var serverUrl = Xrm.Page.context.getServerUrl();
var request = ""
request += "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
request += "<s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\">";
request += "<s:Body>";
request += "<RetrieveMultiple xmlns=\"http://schemas.microsoft.com/xrm/2011/Contracts/Services\" xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\">";
request += "<query i:type=\"a:FetchExpression\" xmlns:a=\"http://schemas.microsoft.com/xrm/2011/Contracts\">";
request += "<a:Query>";
request += "<a:fetch output-format='xml-platform' mapping='logical'>";
request += "<a:entity name='test_entity>";
request += "<attribute name=test_wert/>";
request += "<a:filter type='and'>";
request += "<a:condition attribute='test_id' operator='eq' value='100' />";
request += "</a:filter>";
request += "</a:entity>";
request += "</a:fetch>";
request += "</a:Query>";
request += "</query>";
request += "</RetrieveMultiple>";
request += "</s:Body>";
request += "</s:Envelope>";
var req = new ActiveXObject("Msxml2.XMLHTTP");
req.open("POST", serverUrl + "/XRMServices/2011/Organization.svc", false)
req.setRequestHeader("Accept", "application/xml, text/xml, */*");
req.setRequestHeader("Content-Type", "text/xml; charset=utf-8");
req.setRequestHeader("Content-Length", request.length);
req.setRequestHeader("SOAPAction", "http://schemas.microsoft.com/xrm/2011/Contracts/Services/IOrganizationService/RetrieveMultiple");
req.send(request);
alert(req.status);
4. Juni 2011 08:06
6. Juni 2011 14:43