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.
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