Share all details related to your problem, including any error messages you may have received.
Hi,
Can anyone suggest how do we add bulk users to workgroup members. Do we have any method like setworkgroupmembers(). If so please share us the sample code.
Any suggestions will be really helpfull.
I am working on communityRestAPI plugin which should be available in the colab within few days - I can add this method there so you would be able to do that via webservice.
If you have such case then try
`
import com.google.common.colect.Lists;
List usersLists = Lists.partition(userNames, 2000);
for (List users : usersLists ) {
// do your filter and operation here
QueryOptions …
.
.
.
Util.flushIterator(it);
}
Glad it worked, if you are using above code with more users , follow as Pravin mentioned or you can use below one as you have username directly, fetch the Identity object within the loop itself
for(String userName: userNames){
Identity identity = context.getObjectByName(Identity.class, userName);
// Rest of the code
}