09.10.2009, 03:17 | #1 |
Участник
|
crmdude: Using JavaScript to assign a record
Источник: http://crmdude.wordpress.com/2009/10...sign-a-record/
============== A while back, a user on the Microsoft Dynamics forums asked how to assign a record using JavaScript. Here’s the code, remember to update the userid and recordid variables. var header = GenerateAuthenticationHeader();var userid = "838975f4-029c-de11-9693-0003ffc4c746";var recordid = "9721c859-d185-dc11-ac34-000c291d8da3";var target = "TargetOwnedAccount";var xml = "" +"" +"" +header +" " +" " +" " +" " +" "+ recordid +"" +" " +" " +" "+ userid +"" +" User" +" " +" " +" " +" " +"" +"";var xmlHttpRequest = new ActiveXObject("Msxml2.XMLHTTP");xmlHttpRequest.Open("POST", "/mscrmservices/2007/CrmService.asmx", false);xmlHttpRequest.setRequestHeader("SOAPAction", "http://schemas.microsoft.com/crm/2007/WebServices/Execute");xmlHttpRequest.setRequestHeader("Content-Type", "text/xml; charset=utf-8");xmlHttpRequest.setRequestHeader("Content-Length", xml.length);xmlHttpRequest.send(xml);var resultXml = xmlHttpRequest.responseXML;(I pasted it here so that I can find it easily in future). Tagged: code, javascript, web service Источник: http://crmdude.wordpress.com/2009/10...sign-a-record/
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору. |
|