I have a custom task content type based on the task content type which has a custom priority column, custom assigned to column etc. There are many instances of the task list in multiple site collections.
My requirement is to present a view (custom web part) to a logged in user of all the tasks which are assigned to them. This view needs to look like the actual task list view but filtered for that user.
I have been advised to use search to solve the problem, but my search knowledge is limited. Currently, I have been looking at the FullTextSQLQuery but I'm unsure on how to get all the columns in the content type. I want to get the results as a datatable with all the columns from the task list and bind them to a SPGridView.
I want to say for example: query = "SELECT Priority, taskUrl, Status, workflowUrl, ItemId, ListUrl from Scopes() WHERE scope = 'My Custom Tasks Scope' and assignedUser = " + SPContext.Current.User.LoginName;
Any ideas on how I do this?