November 18, 2020

SOQL to find user part of Queues

Sample SOQLs:

SELECT UserOrGroupId, COUNT( Id ) FROM GroupMember WHERE GroupId IN ( SELECT Id FROM Group WHERE Type = 'Queue' ) GROUP BY UserOrGroupId
 
For User level
SELECT UserOrGroupId, COUNT( Id ) FROM GroupMember WHERE UserOrGroupId = '0055w00000BflFyAAJ' AND GroupId IN ( SELECT Id FROM Group WHERE Type = 'Queue' ) GROUP BY UserOrGroupId 
 
Or use
https://<domain>.my.salesforce.com/_ui/system/user/QueueMembershipPage/d?userId=<User Id>

No comments:

Post a Comment