Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I'm looking for an equivalent to the SPSiteDataQuery functionality in the Client Object Model (COM).

The CamlQuery can be used with an instance of List to execute SPQuery level of aggregation, but is there an equivalent to site collection level queries for the COM?

Checked the Web object: http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.client.web_members.aspx and also the Site object http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.client.site.aspx and don't see anything there. SubwebQuery http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.client.subwebquery.aspx had a promising name, but turns out that it's not what I'm looking for.

Perhaps there's no equivalent functionality in the COM?

Any pointers would be appreciated.

share|improve this question
add comment

1 Answer 1

up vote 8 down vote accepted

There is no equivalent.

Per MSDN (suggested alternative at the end):

The CSOM does not provide a mechanism for querying data across multiple lists that are not associated by a lookup field. In other words, there is no client-side functional equivalent of the SPSiteDataQuery class. If you need to perform a cross-list query from client-side code, consider creating a list view on the server that performs the list aggregation. You can then query the aggregated data from your client-side code.from your client-side code.

http://msdn.microsoft.com/en-us/library/ff798388.aspx

share|improve this answer
    
That's exactly what I was looking for; great information, thanks! Now here's another question, though: a list view by nature only aggregates items in that list. The beauty of SPSiteDataQuery is that I can query every list in every sub-web. So is there some new feature in 2010 lists that allows for deeper aggregation at the list level? –  Charles Chen Nov 21 '10 at 19:47
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.