I have a site collection in SP 2010 with many subsites. Each subsite is for a department. In some cases the people working in the company have responsibilities in more than one department, therefore they need all the tasks assigned to them from any department to be seen at one place. For this we used “User Task” but it did not work? I know that SharePoint 2013 has a web part called My tasks but not in outlook web parts.
1 Answer
SPSiteDataQuery can be used to perform cross-site and cross-list queries. In order to use it, you must call SPWeb.GetSiteData method on the appropriate web and provide a SPSiteDataquery object.
SPSiteDataQuery and SPQuery differ SPSiteDataQueries ability to search more than a single site or single list. SPSiteDataQuery can be configured to search in all lists of a particular list type or list base type located in either
- The complete site collection
- A particular site and sub-sites
Reference:
- https://amjadk.wordpress.com/2012/11/03/spsitedataquery-understanding-with-examples-for-sharepoint-2010/
- http://www.c-sharpcorner.com/uploadfile/Roji.Joy/cross-site-list-query-using-spsitedataquery-in-sharepoint-2010/
- http://sharelearnsp.blogspot.in/2015/03/get-multiple-list-data-across-multiple.html