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
SahajSahaj 

soql query to get the details of queue in which different users are added

Best Answer chosen by Sahaj
pconpcon
If you substitute the user's id for xxxxxxxxxx you will get a list of all Queues that user belongs too
 
select GroupId, Group.Name from GroupMember where UserOrGroupId = 'xxxxxxxxxx'

To get all of the queues available, you can query with the following
 
select Name from Group where Type = 'Queue'

All Answers

pconpcon
Can you please expand upon what you are asking?  What type of data are you expecting to get back from this SOQL query and what are you looking to do with it?
SahajSahaj
I have an Email id and i want to get the details of all the queues in which that email id has been added.
pconpcon
I'm sorry, but that still doesn't narrow anything down for me.  What is the parent object that the queue is associated with?
SahajSahaj
In salesforce setup when you click manage users you will find queue,new queues are created from there and users are added in that queue. I have a user name and i want to get that details of different queues in which that username has been added,
Thanks for your revert. :)
pconpcon
If you substitute the user's id for xxxxxxxxxx you will get a list of all Queues that user belongs too
 
select GroupId, Group.Name from GroupMember where UserOrGroupId = 'xxxxxxxxxx'

To get all of the queues available, you can query with the following
 
select Name from Group where Type = 'Queue'
This was selected as the best answer