Where to find the TaskID

Apr 21, 2009 at 9:17 PM

Hello

I would like to get the taskID of the list
I looked in the SPContext.Current.ListItem and there is a taskcollection
But how do I get the right item from the collection ?
I saw there is a workflowid property, but I don’t know where to get that ?.

Can you guys point me in the right direction ?

Thanks

Guillaume

Apr 22, 2009 at 11:08 AM
Guillaume,

there is no "taskID of the list". I'm not sure what exactly you mean.

There is a taskID, which you have to determine yourself when you create each task for the workflow (its a Guid)

And then there is the item that the workflow is running on, E.g. at "onWorkflowActivated", you have access to that item via the workflowProperties, which include the ItemID and ItemUrl etc.

Hope that helps.
Jennifer
Apr 22, 2009 at 11:36 AM

Jennifer

Sorry I was not clear enough but what I meant was the  taskid  from the tasklist.
But as you mentioned I can find that in the workflowproperties

Thanks

Coordinator
Apr 22, 2009 at 3:15 PM
Just to make sure I understand the question.  Where is it that you need the task id?  Are you trying to access the task in the workflow or in the task form itself?

Chris

Apr 22, 2009 at 4:46 PM
I was trying to get the ID of the task list itself
But Jennifer answered my question :I have to look in the workflowproperties

Guillaume