0

Company is using SharePoint Server 2013 and i'm trying to write a service for another application which people can track workflow status.

What i try is getting Workflow Instance ID with;

/_api/web/lists/GetByTitle('Library Name')/Items(5)?$select=WorkflowInstanceID and there is no select for list item like $select=WorkflowAssociations. And there is no $expand='workflowname' option. Because workflow is not expandable.

but WorkflowInstanceID always returns null, even i got attached multiple workflows and all of them started and completed.

My main goal is creating URL like /_layouts/15/WrkStat.aspx?List={ListGuid}&WorkflowInstanceID={WorkflowInstanceGuid} so when people click this link, they can track the workflow steps.

I've also tried to use Tasks list with /_api/web/lists/getbytitle('Tasks')/Items, but this list also doesn't return Task's associated list item's GUID or WorkflowInstanceID

1 Answer 1

0

A SharePoint list should contain an hyperlink field with your workflow name. This field can be used to get the full URL to the workflow instance.

<<site url>>/_api/web/Lists/getByTitle('<<list title>>')/Items(<<item id>>)

The above API endpoint will return all columns including workflow field with the URL value.

Try this and let me know if it works for you.

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you for help. But that query is not returning any url or workflowid, it only returns Esignature": 20, which is workflow's name and current status id. Also FieldValuesAsHtml and FieldValuesAsText both are not store any workflow url.

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.