taskListItemId = id of task item
web = Web object
SPListItem taskItem = taskList.GetItemById(taskListItemId);
Guid workflowInstanceId = new Guid((string)taskItem["WorkflowInstanceID"]);
SPWorkflow workflowInstance = new SPWorkflow(web, workflowInstanceId);
SPList itemList = workflowInstance.ParentList;
SPListItem parentListItemId = itemList.GetItemById(workflowInstance.ItemId);
2 comments:
Hi Sanjay,
Thanks for the psoting. actualyl my requirement was getting the list of workflow tasks using a List item Id, but I derived it from the fucntion that you have provided here.
Thanks
Shaffi.A
Thank you very much for this!
Post a Comment