function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Vijay Nagarathinam 41Vijay Nagarathinam 41 

Group By logic using Apex

HI All,

I want to implement the group by logic using apex code. I will pass the list<sobject> records based on the single field I need to manipulate the group by logic. Please let me know if anyone has any suggestions.

Thanks,
Vijay
 
pconpcon
Can you give an example of what you mean?  Are you saying like "I want to take a list of Contacts and group them by the LastName field" and get back a data structure that allows you to then do something with that grouped data?