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
VibrateVibrate 

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.
SaiGSaiG
Here is something you can refer to:
http://salesforce.stackexchange.com/questions/12290/selection-of-group-name-and-user-name-from-groupmember-in-one-query