06.10.2014, 13:21 | #17 |
Участник
|
Цитата:
Сообщение от Taker1796
var guid=crmForm.ObjectId;
var xmlHttpRequest = new ActiveXObject("Microsoft.XMLHTTP"); xmlHttpRequest.Open("POST", "/mscrmservices/2007/CrmService.asmx", false); xmlHttpRequest.setRequestHeader("Content-Type", "text/xml; charset=utf-8"); xmlHttpRequest.setRequestHeader("SOAPAction","http://schemas.microsoft.com/crm/2007/WebServices/Retrieve"); var xmlk = [ "<?xml version='1.0' encoding='utf-8'?>", "<soap:Envelope xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>", GenerateAuthenticationHeader(), "<soap:Body>", " <Retrieve xmlns='http://schemas.microsoft.com/crm/2007/WebServices'>", " <entityName>new_dogovor</entityName>", "<id xsi:type='xsd:string'>"+guid+"</id>", " <columnSet xmlns:q1='http://schemas.microsoft.com/crm/2006/Query' xsi:type='q1:ColumnSet'>", "<q1:Attributes>", "<q1:Attribute>new_credit_programm</q1:Attribute>", "</q1:Attributes>", "</columnSet>", "</Retrieve>", "</soap:Body>", "</soap:Envelope>"].join(""); xmlHttpRequest.setRequestHeader("Content-Length", xmlk.length); xmlHttpRequest.send(xmlk); var result= xmlHttpRequest.responseXML.xml; var doc = new ActiveXObject("MSXML2.DOMDocument"); doc.async=false; doc.loadXML(result); var returnNode=doc.selectSingleNode("//new_credit_programm"); alert(returnNode.text); |
|
|
|