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
IvanWuIvanWu 

How to check whether two users are in the same queue in apex trigger?

How to check whether two users are in the same queue in apex trigger?
Best Answer chosen by IvanWu
GauravGargGauravGarg
Hi Ivan,

Query GroupMember sobject of Salesforce and check GroupId of both the user's are same. 

Please check this link: https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_groupmember.htm

Thanks,
Gaurav
Skype: gaurav62990
Takes Freelance Task

All Answers

GauravGargGauravGarg
Hi Ivan,

Query GroupMember sobject of Salesforce and check GroupId of both the user's are same. 

Please check this link: https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_groupmember.htm

Thanks,
Gaurav
Skype: gaurav62990
Takes Freelance Task
This was selected as the best answer
IvanWuIvanWu
it works ,thanks a lot ! ---- 原始邮件 ----