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
DilluSalesForceDilluSalesForce 

How to retrive Users Within Queue

Hi,

    I need to retrive Users from a Queue In order to send an email to queue members .

What i have Done is from GROUP object i retrived records

List<Group> lstGroup = [select id,Type,Email,OwnerId,DoesSendEmailToMembers from Group where Type='Queue' and id='1234xxx']

 

Now from GroupMember Object retrived based on GroupID

list<GroupMember> lstGroupMember=[Select Id,UserOrGroupId, Group.Name from GroupMember where GroupId=:lstGroup [0].id];  

 

Now i need to retrive the users from that group ....

what is the next..... step to continue ?????

 

Pls do the need full...

   

prageethprageeth

An UserId always starts with "005" prefix.

Loop through your Ids list to find users.