locked
Single task assigned to multiple users RRS feed

  • Question

  • I have a first SharePoint List that contains two columns:

    • Name of the application
    • Name(s) of the developer(s)

    There is a second SharePoint List that fires a Sequential Workflow in Visual Studio 2010. That list is about Problems with the applications (ie: An Error with the application "Blabla").

    When a problem is added, The workflow will assign a single task to the developer(s) of the application that has en error.

    If the application concerns more than one person, I would like that there is a single task that is assigned to them. If one of them complete it, the tasks would be also completed for the others.

    I have managed to assign the task to a single person, but I am not sure how to make it works when there is multiples users assigned to the same application.

    It is weird because it is possible to add multiple users via the ShaprePoint List, and it is not via a group (as you can see below).  

    http://s9.postimage.org/4awjdz74v/image01.png

    Programmatically and for a Single User, the code is:

    string AssignedTaskTo = @"domain\baba";
    AssignDevTaskProperties.AssignedTo = AssignedTaskTo;

    I have tried different things and none of them works.

    this.IncidentTaskProperties.AssignedTo = @"10;#Fr----ck;#9;#M----e"
    this.IncidentTaskProperties.AssignedTo = @"domain\baba;#domain\bubu";

    I have made some searches and it seems that it is not possible with SP 2007 but I am not sure about SP 2010. The only way is to create group programmatically with these users in it when the workflow is fired, and to delete it when the workflow ends. The second workaround is maybe to have a group with theses users instead of using a SharePoint List. I would prefer not using groups at all...

    by using Replicator, I think it would make multiples tasks that are independant from each other, so it is not a solution either.

    Is there another solution programmatically ? If no, Why is it possible while adding a new task by seperating them semicolons?

    http://s8.postimage.org/ge7gyoodh/image.png

    Sorry, I could not add images or links because my account is not verify yet.

    Friday, February 15, 2013 4:13 PM

Answers

  • This is a problem that I faced back when I was building custom workflows for SP2007, the TaskProperties.AssignedTo internally only supports a single user, and no matter what you do to it, it doesn't read more than one user. Back then, I ended up not using the assignedTo field and created my own that has the multiuser value, and kept the assignedTo as a single users. I had all sorts of issues when trying to change the Assigned to field to multi-user. Seems like you are creating a custom workflow, so you can control the logic according the custom field too. Hope this helps.

    Dennis Alzoubi

    • Marked as answer by okdreamy Tuesday, February 26, 2013 2:11 PM
    Saturday, February 16, 2013 5:35 PM

All replies

  • This is a problem that I faced back when I was building custom workflows for SP2007, the TaskProperties.AssignedTo internally only supports a single user, and no matter what you do to it, it doesn't read more than one user. Back then, I ended up not using the assignedTo field and created my own that has the multiuser value, and kept the assignedTo as a single users. I had all sorts of issues when trying to change the Assigned to field to multi-user. Seems like you are creating a custom workflow, so you can control the logic according the custom field too. Hope this helps.

    Dennis Alzoubi

    • Marked as answer by okdreamy Tuesday, February 26, 2013 2:11 PM
    Saturday, February 16, 2013 5:35 PM
  • hi Dennis,

    can you pls provide the sample code which you have written for assignedtofield to multiuser. it would be great help if you can post it here.!

    thnx 

    Saturday, January 4, 2014 7:46 PM