You need to sign in to do that
Don't have an account?
Sridhar Venkateswaralu
Fetch the Queue Name not Queue Label : Qsobject
Hi all,
I am facing an issue in retrieving queue name by querying the QSObject.
List<QueueSobject> lstQueueName = [Select Id, SobjectType, QueueId,Queue.Name from QueueSobject where SobjectType = 'Case' AND QueueId =: '00G30000002conp'];
system.debug(lstQueueName[0].queue.Name+'---');
The above query returns me the Queue Label but wat i need is the Queue name as u can see on the UI when u open any Queue.
Waiting for a quick reply,
Thanks,
Sridhar
Sridhar,
Please maek the query like this,
List<Group> lstQueueRecords = [Select Id, Name, DeveloperName, Type from Group where Type = 'Queue'];
Here, you can fetch the list of all Queue records where,
the Name contains Queue Label and DeveloperName contians Queue Name.
Hope this information might be useful.
All Answers
Sridhar,
Please maek the query like this,
List<Group> lstQueueRecords = [Select Id, Name, DeveloperName, Type from Group where Type = 'Queue'];
Here, you can fetch the list of all Queue records where,
the Name contains Queue Label and DeveloperName contians Queue Name.
Hope this information might be useful.
Hopefully I'm not being too presumptuous, but I think your original question may have been misunderstood, and what you're actually looking for is this:
"Queueid" is different from "Queue.id" - based on the rest of your query, it appears that you are looking for the latter, and putting a period between the two words would resolve your issue.