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

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

Get a Group of Users?

Stanley
12-Amethyst

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.

ACCEPTED SOLUTION

Accepted Solutions
BenPerry
15-Moonstone
(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
15-Moonstone
(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.

Stanley
12-Amethyst
(To:BenPerry)

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.

Announcements


Top Tags