Question

I am trying to update a Tasks list item via REST and sending the following body to SharePoint API via POSTMAN tool:

{
    "__metadata": {
        "type": "SP.Data.TasksListItem"
    },
    "Status": "Approved",
    "WorkflowOutcome": "Completed",
    "PercentComplete": 1

}

enter image description here

But I only receive the following error, I tried multiple combinations. I tried even updating only Title, but always the same error response. Any clue what is the issue here?

enter image description here

NOTE : I am able to GET the list item : enter image description here

Was it helpful?

Solution

I do not believe that "Completed" is a valid value for "WorkflowOutcome", you have to set it to "Approved". It has been a couple of years since I wrote this, but I performed a similar REST call on an old project that programmatically completes a workflow task using the following:

{
    "__metadata": {
        "type": "SP.Data.TasksListItem"
    },
    "Status": "Approved",
    "FormData": "Completed",
    "WorkflowOutcome": "Approved",
    "Completed": true,
    "PercentComplete": 1

}
Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top