Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

Unable to get the WorkflowTasks collection from my SPListItem object

$
0
0

I have a SharePoint 2013, Visual Studio workflow running with one task started. I want to access the tasks collection of the list item that the workflow is associated with.

When I access the tasks via the code shown below, Im getting a null value. The Tasks collection count for that list item says it's 0. But I do have a task created.

taskToEdit = listItem.Tasks[0];

How can I access the tasks collection? I want to approve / reject these tasks via code from outside the workflow.

please help!




Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>