Quantcast
Channel: Sam's Activities
Viewing all articles
Browse latest Browse all 3363

SetParameter("fetchXml", FetchXml) dosent support in crm 2016 online

$
0
0

Hi,

I have below code .

function FilterCasesSubgrid() {
//var CasesSubgrid = Xrm.Page.getControl("contact").getGrid();
var CasesSubgrid = window.parent.document.getElementById("contact");

if(CasesSubgrid==null){
setTimeout(function () { FilterCasesSubgrid(); }, 2000); //if the grid hasn’t loaded run this again when it has
return;
}
var fetchXml ="<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false'>"+
"<entity name='contact'>"+
"<attribute name='fullname' />"+
"<filter type='and'>"+
"<condition attribute='fullname' operator='eq' value='s%' />"+
"</filter>"+
"</entity>"+
"</fetch>";

//Here i set the fetchxml directly to subgrid
CasesSubgrid.control.SetParameter("fetchXml", fetchXml); //set the fetch xml to the sub grid
CasesSubgrid.control.Refresh(); //refresh the sub grid using the new fetch xml
}

ERROR :

TypeError: Cannot read property 'SetParameter' of undefined
at FilterCasesSubgrid (astoinetest.crm4.dynamics.com/.../new_Filter_DevisFournnisseur)
at eval (eval at RunHandlerInternal (astoinetest.crm4.dynamics.com/.../ClientApiWrapper.aspx), <anonymous>:1:1)
at RunHandlerInternal (astoinetest.crm4.dynamics.com/.../ClientApiWrapper.aspx)
at RunHandlers (astoinetest.crm4.dynamics.com/.../ClientApiWrapper.aspx)
at OnScriptTagLoaded (astoinetest.crm4.dynamics.com/.../ClientApiWrapper.aspx)
at https://astoinetest.crm4.dynamics.com/form/ClientApiWrapper.aspx?ver=-1861211033:199:1

Any help on this would be highly appreciated,
Thanks and Regards.


Viewing all articles
Browse latest Browse all 3363

Trending Articles



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