I need to use fetch xml in a CRM plugin, and I found here an example on how to do that:
string groupby1 = @"
<fetch distinct='false' mapping='logical' aggregate='true'>
<entity name='opportunity'>
<attribute name='name' alias='opportunity_count' aggregate='countcolumn' />
<attribute name='ownerid' alias='ownerid' groupby='true' />
<attribute name='createdon' alias='createdon' />
<attribute name='customerid' alias='customerid' />
</entity>
</fetch>";
EntityCollection groupby1_result = orgProxy.RetrieveMultiple(new FetchExpression(groupby1));
but there's something else I don't know how to use, or where is it to use.. it's the part which says:
orgProxy.RetrieveMultiple(new FetchExpression(groupby1));
I Know it's an object of the OrganizationServiceProxy, but where is it in the plugin class? I couldn't find out.