Below function can be used to change the fetch
XML and refresh the Grid control. This is 100% tested and working without an
issue with even latest UR 14 on IE, Chrome and Firefox. I haven't access the DOM
directly here since it is not supported.
function PopulateGridFetchXML(sourceFunctionName, subGridName, fetchXML) {
var subGrid = Xrm.Page.getControl(subGridName);
if (subGrid._control.get_innerControl() == null) {
setTimeout(sourceFunctionName, 1000);
return;
}
subGrid._control.get_innerControl().SetParameter("fetchXml", fetchXML);
// Refresh the grid
subGrid.refresh();
}
Cheers,