How to copy summary task and sub tasks


  • I'm trying to update and copy a SummaryTask and its subtasks using the object model, but cannot seem to find any information or documentation on accessing the SummaryTask.

    Is this possible using the object model, and if so, can anyone provide links to documentation?

    thank you

    Jason Curley

    13. června 2012 20:02


  • Hi javkzoo,

    From your description, you may want to get the list items in project task, if so, Summary Task in the list is actually a folder with task metadata, and has items in the folder as the subtasks.

    For the summary task, you  may try to get it use SPListItem.GetItemById or by name or other condition that can be used, for getting the subtasks under in the summary task, you can check the item url property to get the expected items, here is the code snippet:

    SPListItemCollection itemcoll = list.Items;
                        foreach (SPListItem item in itemcoll) {
                            string url = "Lists/project task/summary/" + item.ID + "_.000";
                            if (item.Url.Equals(url))
                                Console.WriteLine(item.ID + ", title: " + item.Title);


    Qiao Wei

    TechNet Community Support

    • Označen jako odpověď Jaykzoo 19. června 2012 21:27
    18. června 2012 7:42