Post

The OOTB approval workflow could not update the item in SharePoint
We encountered the issue where the OOTB approval workflow stopped with the error message “The workflow could not update the item, possibly because one or more columns for the item require a different type of information”. There are a few possible solutions for this issue. Content approval is not configured for the library The service […]

We encountered the issue where the OOTB approval workflow stopped with the error message “The workflow could not update the item, possibly because one or more columns for the item require a different type of information”.

There are a few possible solutions for this issue.

  1. Content approval is not configured for the library
  2. The service account used by the workflow is disabled/removed or password expired as the workflow updates the item with this account
    You can republish the worfklow with an account that has sufficient permissions for the library but who is also working.

The previous version of the workflow has been started a few times before we could resolve this issue where you can use the below script to retrieve the items where the previous version of the workflow is current in progress. First find the workflow name by going to the workflow settings on the specific library.

Next run the following script in the SharePoint Management Shell as administrator where you will need to add the web url, list title and previous version date.

$web = get-spweb <SiteUrl>
$list = $web.lists.trygetlist("<ListName>")
$items = $list.Items
Foreach($item in $items){
$workflows = $item.workflows
foreach($workflow in $workflows){
if($workflow.statustext –eq "In Progress" –or $workflow.statustext –eq "Error Occurred"){
$result = $item.workflows.parentassociation
If($result.internalname –like "*Previous Version:9-2-2018 18:46:48*"){
write-host "$($item.name)"
}
}
}
}

and you will receive a list of the items for which this workflow is still “In Progress” or if an “Error Occurred”

 

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Archive