How can i get task list with itemId programatically? Task list has a column named ReletadeItems, but this is formatted string,json.

I have ListItemId(ID) value, I want to get task list by this ListItemId with Caml query.

I can get all task list items and with foreach loop, parse reletadItems, then get ItemId. But I think this is not the apropriate way. I want to write caml query and getItems with caml query. How can i do that?

Forexample; this is reletadeItems value:


I want to get task list items with ItemId..

1 Answer 1


For those who are trying the same using CSOM.

Step 1: First query the list in which the workflow is running with Item ID - 2

Step 2: Read the Field name which is created with your workflow name. 'VetriWorkFlow' is the workflow name and field name.


Step 3: In this field you will be able to see an instance id. Capture the same and pass it to 'WF4InstanceId' column in Workflow Tasks list.

<Where><Eq><FieldRef Name='WF4InstanceId' /><Value Type='Text'>#instanceID</Value></Eq></Where>

Result: You will get the list of tasks that are created for the list item 2.

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.