You need to sign in to do that
Don't have an account?

apex How to revrieve user name from public groups
I need help in retrieveng the user name from a public group in apex code. This code retrieves the groups base on the group name:
List<Group> g = [SELECT (select userOrGroupId from groupMembers) FROM group WHERE Name =: districtApprovalGpName];
Now I am trying to get to the User Names in the groups. I am able to get to the GroupId, Id, and UserOrGroupId but need to know how to use that information to get to the User Names in the group. Any and all help is appreciated.
List<Group> g = [SELECT (select userOrGroupId from groupMembers) FROM group WHERE Name =: districtApprovalGpName];
Now I am trying to get to the User Names in the groups. I am able to get to the GroupId, Id, and UserOrGroupId but need to know how to use that information to get to the User Names in the group. Any and all help is appreciated.
http://salesforce.stackexchange.com/questions/12290/selection-of-group-name-and-user-name-from-groupmember-in-one-query