+ 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>