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
geetageeta 

Using the SForce API, retrieve the members within a queue

I am working on some customizations for a SalesForce.com customer. In this application, the lead owner id is set to a queue id. I want to retrieve the list of users within this queue, so that I can check if the current logged-in user belongs to this queue or not. Is there an API to do this? Please help.
DevAngelDevAngel
The queue has been depricated in later versions of the API. It has been replaced with the group object. To obtain a lead queue you would query on the type like
"where type = 'Lead'". There are several types of groups that are shown in the type field of the group object (use the describe call to see them).

To obtain the memebers of this group (formerly queue) you would query the GroupMember object using the group id as the filter like so:

"Select Id, UserOrGroupId From GroupMember Where GroupId = '" + groupIdFromPreviousQuery + "'"