Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 55831

Bind FetchXML to subgrid

$
0
0

Hi

Tried to bind below code in onload . throwing error 

function bindgrid()
{
debugger;

var grid=window.parent.document.getElementById("id");

if(grid ==null)
{
setTimeout('bindgrid()', 500);
return;
}

var number="12123";

var fetchXml = "<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false'>" +
"<entity name='entity1'>" +
"<attribute name='param1' />" +
"<attribute name='param2' />" +
"<attribute name='param3' />" +
"<attribute name='param4' />" +
"<attribute name='param5' />" +
"<attribute name='param6' />" +
"<attribute name='param7' />" +
"<attribute name='param8' />" +
"<order attribute='modifiedon' descending='true' />" +
"<filter type='and'>" +
"<condition attribute='param10' operator='eq' value='12123' />" +
"</filter>" +
"</entity>" +
"</fetch>" ;

if (grid.control != null) {
grid.control.SetParameter("fetchXml", fetchXml); //set the fetch xml to the sub grid
grid.control.refresh(); //refresh the sub grid using the new fetch xml
} else {
setTimeout('bindgrid()', 500);
}
}


Viewing all articles
Browse latest Browse all 55831

Trending Articles



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