workflow tasks lists is built in list which works tightly with Create Task, update Task and complete Task activity of workflow foundation. Setting several properties to these activites assignes task to user, update tasks of user and also removes tasks from user task list.
These all actions are taken care automatically.
Several times you still require that columns are not enough for your information in tasks list, you may require to store some additional data in that list. you can ofcourse create column through front end or from code, but assigning values to that columns (fields) is not stright forward process.
When you are adding your own fields in pre-defined list then these fields are actually called "Extended Properties", so you need to take care while assigning the values to these fields.
Here is the way you can accomplish this task.
private void createTask(object sender, EventArgs e)
{
taskID = Guid.NewGuid();
taskProps.Title = "Demo Task";
taskProps.AssignedTo = assignee;
taskProps.Description = instructions;
taskProps.ExtendedProperties["comments"] = comments;
taskProps.ExtendedProperties["instructions"] = instructions;
}
Here is a create task bolck, But Comments and instructions are two more columns added. Values for these columns can be inserted as shown above.
For more information : Click Here
No comments:
Post a Comment