I've a custom workflow developed in VS2008. In this workflow i'm trying to assign a task to either a group e.g. TestGroup or any user(s) - these users i'm getting it from the list on which this workflow is associated.
when i'm creating a task in 'task_MethodInvoking' method and i set the AssignedTo field of taskproperties to the group (TestGroup in this case), it works perfect. Task is created and i can see the AssignedTo field in the task list.
However, when i'm trying to set this AssignedTo field to any user, it doesn't work !! the AssignedTo field in the task list item is empty. infact in code, while debugging, it shows the proper values of the user and everything seems fine. here's the code
SPGroup group = currWeb.SiteGroups["TestGroup"];
SPFieldUserValue groupvalue = new SPFieldUserValue(group.ParentWeb, group.ID, group..ID, group.Name);
Guid taskID = Guid.NewGuid();
taskProperties = new Microsoft.SharePoint.Workflow.SPWorkflowTaskProperties();
string approvers = string.Empty;
//fetch values from list and set them as approvers
View Complete Post