You need to sign in to do that
Don't have an account?
Ranjith YM
Lead count based on Owner ID
I am trying to get count of lead assigned to User in APEX, there are 300+ leads assigned to each users, i can able to see when i query but same if i add in APEX code, its returning zero,
for(User activeLO : activeLOs){
Integer numberOfLeads = [select count() from Lead where OwnerId =:activeLO.Id];
System.debug('Lead Count ::' +numberOfLeads );
}
You can use the below code:
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks and Regards,
Ajay Dubedi
www.ajaydubedi.com