You need to sign in to do that
Don't have an account?
Prosenjit Sarkar 7
Getting Available Obejcts from a queue.
Recently Salesforce has enabled a feature to assign supported objects to a custom queue. I need to get the names (or API) of those supported objects from a queue Id through Apex and SOQL or Meta data. Any body had idea about that ?
Please try to execute below query....!
List<Group>records=[SELECT Id,name,(select SobjectType from QueueSobjects) FROM Group where type='Queue'];
To Get all Objects which are in Queue
for(QueueSobjects qs:records.QueueSobjects){
System.debug('all Sobjects----'+qs.SobjectType);
}
All Answers
Please check if the below code will help
String queueName='Marketing Queue'; String queuesObjectType='Lead'; Id queueID = [Select Id from QueueSobject q where q.Queue.Name =:queueName q.SobjectType:=queueSObjectType]; List<id> queueGroupIDs=[Select Id FROM Group WHERE RelatedID IN :queueId]; List<id> queueUserIds=[Select UserOrGroupId FROM GroupMember WHERE GroupId IN :queueGroupIds];
Best Regards
Naga Kiran
Please try to execute below query....!
List<Group>records=[SELECT Id,name,(select SobjectType from QueueSobjects) FROM Group where type='Queue'];
To Get all Objects which are in Queue
for(QueueSobjects qs:records.QueueSobjects){
System.debug('all Sobjects----'+qs.SobjectType);
}
I got this solution by own before your reply and your answer is exactly the same what I asked for. Thank for you effort.
Thanks :)