Hi everyone
Since the transition from 7 to 13 rollup. The fetch XML query does not work. The red line is the fact that halt program execution. Someone an idea?
thank you
CODE :
//-----------------------------------------------------------------------
var leadGrid = document.getElementById("Products_Associated");
//If this method is called from the form OnLoad, make sure that the grid is loaded before proceeding //Included extra null check as a rollup 5 fix
if (leadGrid == null || leadGrid.readyState != "complete") {
//The subgrid hasn't loaded, wait 1 second and then try again
setTimeout('UpdateSubGrid()', 1000);
return;
}
//Update the fetchXML that will be used by the grid.
var fetchXml = "<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='true'>";
fetchXml += "<entity name='product'>";
fetchXml += "<attribute name='name' />";
fetchXml += "<attribute name='productnumber' />";
fetchXml += "<order attribute='name' descending='false' />";
fetchXml += "<order attribute='productnumber' descending='false' />";
fetchXml += "<link-entity name='geo_expectedrevenue' from='geo_productid' to='productid' alias='aa'>";
fetchXml += "<link-entity name='opportunity' from='opportunityid' to='geo_opportunityid' alias='ab'>";
fetchXml += "<filter type='and'>";
fetchXml += "<condition attribute='geo_accountid' operator='eq' value='";
fetchXml += entity_current_guid;
fetchXml += "' />";
fetchXml += "</filter>";
fetchXml += "</link-entity>";
fetchXml += "</link-entity>";
fetchXml += "<attribute name='productid' />";
fetchXml += "</entity>";
fetchXml += "</fetch>";
//Inject the new fetchXml
leadGrid.control.setParameter("fetchXml", fetchXml);
//Force the subgrid to refresh
leadGrid.control.refresh();
*This post is locked for comments