cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

How to get All Groups from the Organization

ptc-3953915
1-Newbie

How to get All Groups from the Organization

Hi Can any one help me how I can get All groups from any particular WTOrganization using Windchill API

1 REPLY 1

Following works on 10.2 M10.

//get WTOrganization

WTOrganization myOrg = WTOrganization.newWTOrganization("Demo Organization");

final DirectoryContextProvider dirContProvider = (DirectoryContextProvider) myOrg;

//get Enumeration for groups in WTOrganization

final Enumeration groupsEnum = OrganizationServicesHelper.manager.findLikeGroups("*", dirContProvider);

while (groupsEnum.hasMoreElements()) {

final WTGroup myGroup = (WTGroup) groupsEnum.nextElement();

System.out.println( "myGroup: " + myGroup.getName());

}

Top Tags