GroupBy, Sum and EntityCollection in CRM – Nishant Rana’s Weblog
Just sharing a sample code that could be used for group by and sum operation on EntityCollection.
Suppose below is the output that we want
We can use the below code for that.
// select categoryid, final forecast, final awards from SubCategory Entity // category id is lookup in SubCategory Entity EntityCollection result = orgProxy.RetrieveMultiple(new FetchExpression(fetch)); var details = from r in result.Entities.AsEnumerable() group r by new { groupByCategoryID =...
Full Article
GroupBy, Sum and EntityCollection in CRM – Nishant Rana’s Weblog
Blog Syndicated with Nishant Rana’s Permission
More About This Author
Array
- Dyn365CE17 September 2024New Lead Qualification Experience – Dynamics 365 Sales
- Dyn365CE16 September 2024Bypass Power Automate Flows using SuppressCallbackRegistrationExpanderJob optional parameter – Dataverse / Dynamics 365
- Dyn365CE10 September 2024Sample Code to create and associate Folder / SharePoint Document Location (Dataverse /Dynamics 365 / SharePoint Online)
- Dyn365CE9 September 2024Fixed – The attempted operation is prohibited because it exceeds the list view threshold error– SharePoint Online