Queues are stored into Group Objects in Salesforce and Users that are present are being stored into GroupMember Object.
Use below SOQL Queries.
For All the Queues into Salesforce Org.
select Id from Group where Type = 'Queue'
For Quering specific Queue.
select Id from Group where Type = 'Queue' AND NAME = 'QueueName'
// You can also use DeveloperName so that if you have used Queue Name Developer Name Will be same SOQL will be like
select Id from Group where Type = 'Queue' AND DeveloperNAME = 'Test_Queue' // If QueueName is Test Queue the developer Name will be Test_Queue
If you want to query public groups/quques then use below SOQL.
select Id from Group where Type = 'Public' AND Developer_Name='Test_Group'
SOQL is not the native language that can be found in Salesforce. It is used as part of Apex for developer to create queries therefore you need to be using the tools like Developer Console to use SOQL to create the query and begin back the results. If you want to experiment on this area I suggest you try out Trailhead. The exercies below will give you a starting point.
Queues are stored into Group Objects in Salesforce and Users that are present are being stored into GroupMember Object.
Use below SOQL Queries.
For All the Queues into Salesforce Org.
select Id from Group where Type = 'Queue'
For Quering specific Queue.
select Id from Group where Type = 'Queue' AND NAME = 'QueueName'
// You can also use DeveloperName so that if you have used Queue Name Developer Name Will be same SOQL will be like
select Id from Group where Type = 'Queue' AND DeveloperNAME = 'Test_Queue' // If QueueName is Test Queue the developer Name will be Test_Queue
If you want to query public groups/quques then use below SOQL.
select Id from Group where Type = 'Public' AND Developer_Name='Test_Group'
Queues are stored into Group Objects in Salesforce and Users that are present are being stored into GroupMember Object.
Use below SOQL Queries.
For All the Queues into Salesforce Org.
For Quering specific Queue.
If you want to query public groups/quques then use below SOQL.
Please let us know if this helps :)
Thanks,
AMit Singh
All Answers
https://trailhead.salesforce.com/modules/apex_database/units/apex_database_soql
please check below code.
If you substitute the user's id for xxxxxxxxxx you will get a list of all Queues that user belongs too To get all of the queues available, you can query with the following.
let me know if you need any details.
Thanks
Varaprasad
Let me know if this helps.
Queues are stored into Group Objects in Salesforce and Users that are present are being stored into GroupMember Object.
Use below SOQL Queries.
For All the Queues into Salesforce Org.
For Quering specific Queue.
If you want to query public groups/quques then use below SOQL.
Please let us know if this helps :)
Thanks,
AMit Singh