Returns an ITask
array in the given task list based on the ITaskFilter
.
null
. null
. An ITask
array of task objects in a task list.
ITaskFilter taskFilter = tasklistManager.CreateTaskFilter();
//search on all tasks; other options include searching for COMPLETED tasks, OVERDUE tasks, or PENDING tasks
taskFilter.CompletionType = TaskCompletionFilterTypes.All;
//limit the return results to be 10; setting this to 0 will return all results
taskFilter.MaximumResults = 10;
//disable security checking on the returned objects against the user who performs this query,
//so that all objects will be returned
taskFilter.RestoreSecurity = false;
//user TaskQueryOrder to sort the query result; below TaskQueryOrder shows sorting the returned task lists by NAME in ascending order
TaskQueryOrder taskQueryOrder = new TaskQueryOrder(TaskAttributes.Name, true);
taskFilter.setQueryOrders(new TaskQueryOrder[] { taskQueryOrder } );
//an array of ITask objects are returned from queryTasks(ITaskList); if no result is retrieved, a zero-length array will be returned
ITask[] retrievedTasks = tasklistManager.queryTasks(tasklist, taskFilter);
Exception Type | Condition |
---|---|
CollaborationException | The method call resulted in an error. |
InvalidOperationException | The project has not yet been stored or has already been removed. |
SoapException | There was a communication problem during the execution of the remote method call. |
ITaskListManager Interface | Plumtree.Remote.PRC.Collaboration.Tasklist Namespace | ITaskListManager.QueryTasks Overload List