Hi All,
I am getting error with this "ReadXml is not defined at eval (eval at RunHandlerInternal (rbt02.crm8.dynamics.com/.../ClientApiWrapper.aspx), <anonymous>:1:1)" while onchange of option set field value in form.
Below Code am trying :
function ReadXml ()
{
try{
var xmlPath = "../WebResources/ags_ExternalXmlFile";
$.ajax({
type: "GET",
url: xmlPath,
dataType: "xml",
success: parseXML
});
}
catch(e){
alert(“Error while reading XML; Description – ” + e.description);
}
}
function parseXML(xml) {
$(xml).find("DisableFields").each(function () {
var fieldName = $(this).find("name").text();
var optValue=Xrm.Page.getAttribute("ags_externalsystem").getValue();
if (optValue == 283210000) {
alert("Hi");
Xrm.Page.getControl(fieldName).setDisabled(true);
}
else{
alert("Error");
}
});
}
Thanks,
Jharana