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
Deepak PansariDeepak Pansari 

Is there any way to get Users Id from Queue via Apex ?

Hi All,

 

Is there any way to get Users Id from Queue via Apex ?

 

- Deepak

Best Answer chosen by Admin (Salesforce Developers) 
forecast_is_cloudyforecast_is_cloudy

If you mean 'is there a way to determine the Users that belong to a particular Queue via Apex', then yes just perform a SOQL query on the GroupMember SObject. For e.g.

 

select g.UserOrGroupId From GroupMember g where groupId = <ID of the Queue you're interested in>