Quantcast
Channel: Microsoft Dynamics CRM
Viewing all articles
Browse latest Browse all 154803

Forum Post: JavaScript Code Upgrade from CRM 2011 to work with CRM 2013 - Service endpoint 2007 and SOAP

$
0
0
we had developed a custom application for MS CRM 4.0 for this we had used; i. ./CrmService.asmx ii. ./MetadataService.asmx this is a sample function Please support to upgrade the below function to CRM 2013 , then 2015 2007/WebServices is not supported in 2013 . function new_vatgroup_onchange() { if (crmForm.all.new_vatgroupid.DataValue != null) { var vatgroupID= crmForm.all.new_vatgroupid.DataValue[0].id; var authenticationHeader = GenerateAuthenticationHeader(); var xml = " "+ " schemas.xmlsoap.org/.../'" " xmlns:xsi=' ">www.w3.org/.../XMLSchema-instance'" " xmlns:xsd=' ">www.w3.org/.../XMLSchema'>" authenticationHeader+ " "+ " schemas.microsoft.com/.../WebServices'>" " new_vatgroup "+ " " + vatgroupID + " "+ " "+ " "+ " new_vatvalues "+ " "+ " "+ " "+ " "+ " "; var xHReq = new ActiveXObject("Msxml2.XMLHTTP"); xHReq.Open("POST", "/mscrmservices/2007/CrmService.asmx", false); xHReq.setRequestHeader("SOAPAction"," ">schemas.microsoft.com/.../Retrieve"); xHReq.setRequestHeader("Content-Type", "text/xml; charset=utf-8"); xHReq.setRequestHeader("Content-Length", xml.length); xHReq.send(xml); var resultXml = xHReq.responseXML; var errorCount = resultXml.selectNodes('//error').length; if (errorCount != 0) { var msg = resultXml.selectSingleNode('//description').nodeTypedValue; alert(msg); } else { //filterSubGrid(); ///// var paymentamountValue = Xrm.Page.getAttribute("new_paymentamount").getValue(); //if (optValue == 0) { // crmForm.all.new_vatgroupvalue.DataValue = 0.06; var VARvatgroupvalu = parseFloat(resultXml.selectSingleNode("//q1:new_vatvalues").nodeTypedValue) crmForm.all.new_vatgroupvalue.DataValue=(VARvatgroupvalu); crmForm.all.new_vatvalue.DataValue=(0); crmForm.all.new_dueamount.DataValue=(paymentamountValue); if (VARvatgroupvalu !=0) { var VARValue= (paymentamountValue * VARvatgroupvalu); crmForm.all.new_vatvalue.DataValue=(VARValue); crmForm.all.new_dueamount.DataValue=(VARValue + paymentamountValue); } //alert(parseFloat(resultXml.selectSingleNode("//q1:new_vatvalues").nodeTypedValue)); // alert(resultXml.selectSingleNode("//q1:new_vatvalues").nodeTypedValue); // crmForm.all.new_vatgroupvalue.DataValue = resultXml.selectSingleNode('//q1:new_vatvalues') == null ? 0 : parseInt( // parseFloat(resultXml.selectSingleNode('//q1:new_vatvalues').nodeTypedValue);} //crmForm.all.new_vatgroupvalue.DataValue=(resultXml.selectSingleNode("//q1:new_vatvalues").nodeTypedValue); /// } } }

Viewing all articles
Browse latest Browse all 154803

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>