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

1 Answer 1


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

  • 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
    Commented Sep 19, 2010 at 14:17
  • On second thought... it still would give me same results.
    – SAV
    Commented Sep 19, 2010 at 14:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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