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) {
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,
Hi.
ReplyDeleteI'm Trying to get this code running in CRM2013 ur1 but cant find the "_control" property. Have you seen this before?
Thanks!
/ Johan
I cannot get this to work either. The old way in CRM 2011 doesn't seem to be working well either. Confusing...
ReplyDelete