views:

18

answers:

1

I've created a list definition feature and in the elements.xml I've set its Type="111333". I've installed this list feature on several webs in my farm and created many lists from it. Is there an efficient way, maybe in CAML, to query my farm and retrieve only lists of this type (ServerTemplate = 111333) back? Thanks SF.

A: 

You can use the SPSiteDataQuery class to create a query that will search specific list types across all webs in an SPSite. The results are returned in a DataTable. This is probably the most effective way to query in Sharepoint. T

The sample in the documentation works both for 2007 and 2010 and queries all lists of type 105 (Contacts) accross all sites in the SiteCollection.

Panagiotis Kanavos