var xml = "" +
"" +
"" +
GenerateAuthenticationHeader () + " "+
" "+
" "+
" "+
" "+
"" +
"";
var xmlHttpRequest = nowy ActiveXObject ("Msxml2.XMLHTTP");
xmlHttpRequest.Open ("POCZTA"," /mscrmservices/2007/CrmService.asmx ", fałszywy);
xmlHttpRequest.setRequestHeader ("SOAPAction", "http://schemas.microsoft.com/crm/2007/WebServices/Execute ");
xmlHttpRequest.setRequestHeader ("Zadawalać-Typ", "tekst/xml; charset=utf-8");
xmlHttpRequest.setRequestHeader ("Zadawalać-Długość", xml.length);
xmlHttpRequest.send (xml);
var resultXml = xmlHttpRequest.responseXML;
var userId = resultXml.selectSingleNode ("//UserId") .text;
var xml = "" +
"" +
"" +
GenerateAuthenticationHeader () + " "+
" "+
" systemuser" +
" "+ userId + "" +
" "+
" "+
" firstname" +
" "+
" "+
" "+
" "+
"" +
"";
var xmlHttpRequest = nowy ActiveXObject ("Msxml2.XMLHTTP");
xmlHttpRequest.Open ("POCZTA"," /mscrmservices/2007/CrmService.asmx ", fałszywy);
xmlHttpRequest.setRequestHeader ("SOAPAction", "http://schemas.microsoft.com/crm/2007/WebServices/Retrieve ");
xmlHttpRequest.setRequestHeader ("Zadawalać-Typ", "tekst/xml; charset=utf-8");
xmlHttpRequest.setRequestHeader ("Zadawalać-Długość", xml.length);
xmlHttpRequest.send (xml);
var resultXml = xmlHttpRequest.responseXML;
crmForm.all.new_currentuser.DataValue = resultXml.selectSingleNode ("//q1: firstname") .text;
|