문제

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

도움이 되었습니까?

해결책

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

}
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 sharepoint.stackexchange
scroll top