RE: Write data in XML file
Hi Moshe Hayun, Alok Srivastav, Shidin Haridas and Sandeep Mishra
I use the following code
function Test(){
var serverUrl = window.parent.Xrm.Page.context.getClientUrl();
var webResourceName = "apikey"
var webResourceURL = WebResourceURL(webResourceName);
var nodePath = "//Configuration";
var XmlDoc= new ActiveXObject("Microsoft.XMLDOM");
XmlDoc.preserveWhiteSpace = true;
XmlDoc.async = false;
XmlDoc.load(webResourceURL);
var nodelist;
nodelist = XmlDoc.selectNodes(nodePath);
document.getElementById('APIkey').value = nodelist[0].selectSingleNode("APIkey").nodeTypedValue;
nodelist[0].selectSingleNode("APIkey").nodeTypedValue = "sdsds"//nodeTypedValue = "sdsd";
XmlDoc.save(nodePath);
//nodelist[0].selectSingleNode("APIkey").value("fgdddft");
//XmlDoc.selectNodes(nodePath).set("sdsd")
webResourceName = "logo";
document.getElementById('logo').src = WebResourceURL(webResourceName);
}
It is giving me error at
How may resolve this issue?
Thank You