I am trying to get a reference to my Main Grid through a JS script written on a new command of the Main Grid command bar. "SelectedControl" is the parameter I am passing to JS. I got the below code for this.
function ExportWithLogos(gridContext){
var grid = gridContext.getGrid();
var fetchXMLStr = gridContext.getFetchXML();
console.log(fetchXMLStr);
}
Somehow it doesn't work and throws the error gridContext.getFetchXML is not a function. What's wrong here?
Thanks,
Ramesh Mukka