Hi,
I am not able to bind the fetchxml to subgrid during onload in CRM 2013. I want to bind dynamically based on the column value.
Below are the approaches I tried.
var fetchXml = "<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false'>" +
" <entity name='mhi_memberassociatedpcps'>" +
" <attribute name='mhi_name' />" +
" <attribute name='createdon' />" +
" <order attribute='name' descending='false' />" +
" <filter type='and'>" +
" <condition attribute='mhi_member' operator='eq' value='" + contactId + "' />" +
" </filter>" +
" </entity>" +
"</fetch>";
1.
Xrm.Page.getControl('MemberAssociatedPCPs')._control.get_innerControl()._element.control.SetParameter("fetchxml",fetchXml);
2.
var grid = document.getElementById('MemberAssociatedPCPs');
//var grid =Xrm.Page.ui.controls.get("MemberAssociatedPCPs");
if(grid==null || grid.readyState != "complete")
{
alert("grid is null");
setTimeout('disableTab2onLoad()',1000);
return;
}
grid.control.SetParameter("fetchXml", fetchXml);
grid.control.refresh();
Could anyone please let me know whether it is possible in CRM 2013.