Answered by:
Aggregate functions in Query Expression

Question
-
Hi,
I am using Query expression in my plug-in and along with my condition expression(where clause and join condition) i want to use Group by statement to retrieve the count.
Can anyone suggest the query expression for this with example.
Thanks is advance..
Wednesday, October 20, 2010 7:07 AM
Answers
-
It is not possible with Query Expression. You can use FetchXML or Filtered Views for your requirement. Better go with the latter one.
Vicky http://howto-mscrm.blogspot.com "Please Mark it as answer if it helps in resolving your query"- Proposed as answer by DavidBerryMVP, Moderator Wednesday, October 20, 2010 4:11 PM
- Marked as answer by DavidJennawayMVP, Moderator Friday, October 29, 2010 11:00 AM
Wednesday, October 20, 2010 9:55 AM
All replies
-
It is not possible with Query Expression. You can use FetchXML or Filtered Views for your requirement. Better go with the latter one.
Vicky http://howto-mscrm.blogspot.com "Please Mark it as answer if it helps in resolving your query"- Proposed as answer by DavidBerryMVP, Moderator Wednesday, October 20, 2010 4:11 PM
- Marked as answer by DavidJennawayMVP, Moderator Friday, October 29, 2010 11:00 AM
Wednesday, October 20, 2010 9:55 AM -
Hi,
Please see the below post for more details on Aggregate functions supported by MS CRM 4.
http://mscrm-developer.blogspot.com/search/label/Aggregate%20Functions
Direct Link - http://blogs.msdn.com/b/crm/archive/2009/03/10/support-for-count-distinct-in-fetch-xml-queries.aspxHope it helps.
Thanks, Ranjitsingh R | http://mscrm-developer.blogspot.com/ | MS CRM ConsultantWednesday, October 20, 2010 11:02 AM -
It is not possible to aggregate with queryexpression, you need to use FetchXml to get aggegate data from CRM.
Check this post for the same
Hope this helps. AmarWednesday, October 20, 2010 12:33 PM