Quantcast
Channel: SharePoint 2010 - Development and Programming forum
Viewing all articles
Browse latest Browse all 11571

Client Object Model Get SiteGroups (By Name?)

$
0
0

I have the following code in a Client Object Model method:

Group oGroup = clientContext.Web.SiteGroups.GetById(mGroupID);

However, I need to get the group by name. In order to do this I have retrieved a collection of group names and IDs using the usergroup.asmx and searched through it to find the ID, finally applying the above code. It works, but is not cool enough.

I have not found any other method on the SiteGroups collection which would allow me to search by name.  The .FirstOrDefault method throws an error saying that Lambdas are not allowed.

I am looking for something maybe that would allow me to pass a CAML query such as the ListItemCollection which has the .GetItems method.


Viewing all articles
Browse latest Browse all 11571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>