if you want to Find Number Of Active Users In a Role use the Below simple SOQL query.
Active Users in Role:
Active Users In Public Group:
find below screenshot for more information
Active Users In Queue:
find below screenshot for more information
Active Users in Role:
SELECT Id, Name, Email, isActive, Profile.Name, UserRole.Name, UserType FROM User WHERE UserRole.Name = '<Role Name>' AND isActive = true
OR
SELECT Count(Id) FROM User WHERE UserRole.Name = '<Role Name>' AND isActive = true
find below screenshot for more information.Active Users In Public Group:
SELECT Id, Name, Email, isActive, Profile.Name, UserRole.Name, UserType FROM User WHERE Id IN (SELECT UserorGroupId FROM GroupMember WHERE Group.Name = '<group Name>') AND isActive = true
OR
SELECT Count(Id) FROM User WHERE Id IN (SELECT UserorGroupId FROM GroupMember WHERE Group.Name = '<Group Name>') AND isActive = true
find below screenshot for more information
Active Users In Queue:
SELECT Id, Name, Email, isActive, Profile.Name, UserRole.Name, UserType FROM User WHERE Id IN (SELECT UserOrGroupId FROM GroupMember WHERE Group.Type= 'Queue' AND Group.Name = ' <queue Name>') AND isActive = true
OR
SELECT Count(Id) FROM User Where Id IN (SELECT UserOrGroupId FROM GroupMember Where Group.Type= 'Queue' AND Group.Name = '<queue Name>') AND isActive = true
find below screenshot for more information
No comments:
Post a Comment