SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Which workflow intance Id field should I use?

I have two kind of workflows in my project (associated with document in doclib and associated with basic list item in task list.

I have been told that "ows_WorkflowInstanceID" is only for documentlibrary workflows... Still I am getting same IDs from both of those field despite which workflow task I get that value from.

And I try to get those ID from workflow task itself...

Guid tempIdOWS = new Guid(item["ows_WorkflowInstanceID"].ToString());

Guid tempIdBuiltIn = new Guid(item[SPBuiltInFieldId.WorkflowInstanceID].ToString());

Thanks in advance

share|improve this question
up vote 0 down vote accepted

You instead tried the SPListItem.Workflows property to get information about workflow instances running for a particular item?

share|improve this answer
It would be great to use just that approach. I want to have Ids because I query tasklists with CAML and there are same tasks which belong to same wokflow.. My approach is to filter unique intance IDs from SPListITemCollection that I get in CAML query. It raises a question: Can workflow instance IDs query with CAML clause ? That would be awesome?! – SAV Sep 19 '10 at 14:17
On second thought... it still would give me same results. – SAV Sep 19 '10 at 14:36

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.