// XmlHttp Request var AjaxRequest = function (crmSvcUrl, soapString) { var XmlHttp = new ActiveXObject("Msxml2.XMLHTTP"); XmlHttp.open("POST", crmSvcUrl, false); XmlHttp.setRequestHeader("Content-Type", "text/xml; charset=utf-8"); XmlHttp.setRequestHeader("SOAPAction", "http://schemas.microsoft.com/crm/2007/WebServices/Fetch"); XmlHttp.setRequestHeader("Content-Length", soapString.length); XmlHttp.send(soapString); var resultXml = XmlHttp.responseXML; return resultXml; };