-
how to count open cases against owner id by map in Salesforce?
list<AggregateResult> result = ([select ownerid,count(id)total from case where isclosed = false group by ownerid]);
map<id,integer> mapresult = new map<id,integer>
For (AggregateResult aggresult : result)
{
mapresult.put(aggresult.get(aggresult.ownerd),aggresult.get(total) )
- This discussion was modified 5 years, 10 months ago by yash ghatge.
- This discussion was modified 5 years, 9 months ago by Forcetalks.
- This discussion was modified 5 years, 9 months ago by Forcetalks.
Log In to reply.
Popular Salesforce Blogs
Why Salesforce Apex Trigger is Unique?
What is Salesforce Apex Trigger? A trigger is a piece of code that executes automatically in response to a specific event, such as the creation…
Get Started with Salesforce Apex Test Class | The Developer Guide
Testing is a crucial part of the Salesforce development life cycle. Whenever we do code in Salesforce, we cannot send it directly to the production.…
The Ultimate Guide To Making The Name Field Unique In Salesforce
The Salesforce platform has a unique function that allows users to create a custom page layout. This is a powerful tool since you are able…
Popular Salesforce Videos
Lesser Known VSCode Tips for Salesforce Developers
More Code, Less Work. Whether you are a beginner or an advanced developer, smart tips, and sharp tools can significantly improve your productivity. There are…
What is CRM? | Salesforce Essentials 101 | Salesforce
In this video, Salesforce Support explains how Customer Relationship Management (CRM) can help companies better engage with prospects, and customers, and streamline communications for business…
Salesforce Admin Tutorial For Beginners
What is Salesforce Admin? Salesforce Admin is totally a Business Leader. Who should have in-depth knowledge, how the company operates. In designing all its Departments.…