Activity Forums Salesforce® Discussions how to count open cases against owner id by map in Salesforce?

  • how to count open cases against owner id by map in Salesforce?

    Posted by yash ghatge on December 31, 2018 at 8:13 am

    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, 11 months ago by  yash ghatge.
    • This discussion was modified 5 years, 10 months ago by  Forcetalks.
    • This discussion was modified 5 years, 10 months ago by  Forcetalks.
    Jade replied 5 years, 10 months ago 2 Members · 1 Reply
  • 1 Reply
  • Jade

    Member
    January 30, 2019 at 10:26 am

    You can also explore report features here. Summary report on case to display only open cases and then group it by owner names.

     

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos