Показать сообщение отдельно
Старый 06.07.2010, 14:03   #2  
Konstantin Katsovich is offline
Konstantin Katsovich
Участник
Аватар для Konstantin Katsovich
Лучший по профессии 2014
Лучший по профессии AXAWARD 2013
 
243 / 57 (2) ++++
Регистрация: 22.10.2008
Адрес: Israel
Вы не посылаете ID Вы посылаете [object]
Попробуй вот так

Код:
 
var id = crmForm.all.parentcustomerid.DataValue[0].id;;
 
// Prepare the SOAP message. var xml = "<?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>"+ "<Update xmlns='http://schemas.microsoft.com/crm/2007/WebServices'>"+ "<entity xsi:type='account'>"+ "<acc_ceoid>"+crmForm.ObjectId+"</acc_ceoid>"+ "<contactid>"+id+"</contactid>"+ "</entity>"+ "</Update>"+ "</soap:Body>"+ "</soap:Envelope>"; // Prepare the xmlHttpObject and send the request. var xHReq = new ActiveXObject("Msxml2.XMLHTTP"); xHReq.Open("POST", "/mscrmservices/2007/CrmService.asmx", false); xHReq.setRequestHeader("SOAPAction","http://schemas.microsoft.com/crm/2007/WebServices/Update"); xHReq.setRequestHeader("Content-Type", "text/xml; charset=utf-8"); xHReq.setRequestHeader("Content-Length", xml.length); xHReq.send(xml); // Capture the result var resultXml = xHReq.responseXML;
__________________
Читайте SDK!!!