Lucy de Boer
 

Assign a task to a Group

29

Feb

Assigning a (workflow)task to a Group from code can be tricky, but this trick works:

SPGroup group = SPWeb.UserGroups[“groupname”];
SPFieldUserValue groupvalue = new SPFIeldUserValue(                  group.ParentWeb, group.ID, group.Name);
SPWorkflowTaskProperties taskProperties = new SPWorkflowTaskProperties();
 (Connect these taskproperties to the task to update)

taskProperties.AssignedTo = groupvalue.LookupValue;

To display these tasks in the task list the view 'Groups' has to be selected. they will not shop up in the 'My Tasks' view.

 

Lucy de Boer schreef

Comments (0)

Lucy de Boer
Comments are closed.

Zoeken

Categorie

Archief


Sign In