I have a Set made up of group members - but it includes members who are managers of group members.
I thought I could iterate over the set and for each member of the group query the user object manager field to see if it exists:
for (id thisId: result) {
string MgrId= [SELECT Id FROM User WHERE ManagerId =: result].Id;
if (MgrId=thisId){
}
}
But I will probably blow the governor SOQL limits doing it this way?
So what is the correct way to remove all the elements from my list results
if they are the manager of another member?