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

We are happy to announce the new Windchill Customization board! Learn more.

Get a Group of Users?

Stanley
1-Newbie

Get a Group of Users?

Hi,

how can I get a group of users?

I've tried this code.

wt.org.WTGroup myGroup = wt.org.OrganizationServicesHelper.manager.getGroup("My group");

But the result is allways the same—myGroup value is null.

Name of the group is correct.

Any help is appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions
BenPerry
13-Aquamarine
(To:Stanley)

wt.org.WTGroup myGroup = wt.org.StandardOrganizationServicesHelper.manager.getGroup("My group");

Perhaps?

I am feeding getGroup() both a String (the group name) and a WTOrganization. I'm not sure off the top of my head if the WTOrganization is optional or not.

View solution in original post

5 REPLIES 5
BenPerry
13-Aquamarine
(To:Stanley)

wt.org.WTGroup myGroup = wt.org.StandardOrganizationServicesHelper.manager.getGroup("My group");

Perhaps?

I am feeding getGroup() both a String (the group name) and a WTOrganization. I'm not sure off the top of my head if the WTOrganization is optional or not.

Feeding method with WTOrganization too works for me, thx.

Hello Stanislav,

Can you post the code that works for you. I get null with the same code

  • wt.org.WTGroup myGroup = wt.org.OrganizationServicesHelper.manager.getGroup("My group"); 

Regards,

Gautham

Hello Gautham,

Did you try with directory service provider ?

wt.org.DirectoryContextProvider dsprovider = wt.org.OrganizationServicesHelper.manager.newDirectoryContextProvider(services, null);

wt.org.WTGroup myGroup = wt.org.OrganizationServicesHelper.manager.getGroup("groupname", dsprovider);

Thank you

Binesh Kumar

Barry Wehmiller

Hello Binesh,

Thanks. that worked.

Top Tags