Get the value of related content of a task list in sharepoint 2010 C# RRS feed

  • Question

  • We know that, task list of workflow has a column named Related content. How can I get the value of Related Content of specific task item. I have tried following way but unsuccessful.

    var campaignTaskList = currentWeb.Lists["CampaignTask"].Items;
    var currentUserTaskList = (from SPListItem taskItem in campaignTaskList
                                let assignTo = new SPFieldUserValue(taskItem.Web, taskItem["Assigned To"].ToString())
                                 where assignTo.User.Name == currentWeb.CurrentUser.Name
                                 select taskItem).ToList();
         foreach (SPListItem workflowTaskItem in currentUserTaskList)
                 var item =  workflowTaskItem["Related Content"].ToString();


    • Moved by Mr. Wharty Monday, August 11, 2014 10:09 PM Not a Training and Certification question
    Monday, August 11, 2014 6:34 PM

All replies