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
VICKY_SFDCVICKY_SFDC 

Case Owner Details Lifgtning Component or LWC Component

MY REQUIREMENT IS,,if i click on case owner icon  all the cases status as  open, close, escalated etc were shown to me 

in LWC or Lightning UI


I wrote a apex code as well,,,


public with sharing class caseAgentCount {
    
    @AuraEnabled
    public Static Integer openCaseCount(){
        return[SELECT count() from Case Where Status!='Closed' And OwnerId=:UserInfo.getUserID()];
    }
    
    @AuraEnabled
    public Static Integer closeCaseCount(){
        return[SELECT count() from Case Where Status='Closed'And OwnerId=:UserInfo.getUserID()];
    }
    
    @AuraEnabled
    public Static Integer workingCaseCount(){
        return[SELECT count() from Case Where Status='working' And OwnerId=:UserInfo.getUserID()];
    }
    
     @AuraEnabled
    public Static Integer esclatedCaseCount(){
        return[SELECT count() from Case Where Status='Esclated' And OwnerId=:UserInfo.getUserID()];
    }
    
    @AuraEnabled
    public Static Integer holdCaseCount(){
        return[SELECT count() from Case Where Status='Hold' And OwnerId=:UserInfo.getUserID()];
    }
}
PriyaPriya (Salesforce Developers) 

Hey Vicky,

Can you also provide the component you created and showing owner icon?

Regards,

Priya Ranjan