This might seem a bit of an odd request so I'll try to offer some background. I have a feature on my CRM which requires that user should be able to filter a view and then save the resulting records such that a separate process can pick them up and process them periodically e.g. daily.
Now here's the catch, they want this process to requery the data before it processes it, so basically what should be saved is the query or filters rather than the data in the view.
Having previously written some javascript code which dynamically sets the fetchxml on a subgrid like so
Subgrid.getGrid().setParameter("fetchXml", fetchxml);
I though it should be fairly straight forward to potentially retrieve the fetchxml in the grid
Subgrid.getGrid().getParameter("fetchXml");
However that doesn't work and I can't seem to find any documentation or anything that can point me in the right direction. I have used Developer tools to inspect the properties of Mscrm.XrmControlGridWrapper
but I can't find anything useful..
If anyone knows how I can retrieve the fetchxml that powers a subgrid using javascript, it would be massively helpful?
EDIT
I have just found that I can do this
Subgrid.getGrid().getFilter().$3_1.GetParameter("fetchXml")
and that returns exactly what I want, however this just screams of hacky and unsupported.
$3_1
has a type of [object (Mscrm.TurboGridControl)]
Is there a way I can access this object in a supported way?