Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

SharePoint 2013 Delete Completed Workflow History In List Item

$
0
0

I'm trying to delete in SharePoint 2013 the list of the Completed Workflows displayed at the bottom of the/workflow.aspx page. In SharePoint 2010 that was easily done with the PowerShell code below. However, in 2013 the code fails with $spitem.Workflows being empty? How do I go about deleting these Completed Workflows in 2013? Thanks!

$spweb = Get-SPWeb http://sps-server/website
$splist = $spweb.Lists["YourList"]
$spitem = $splist.GetItemById(1)
$spitem.Workflows | % { $web.Site.WorkflowManager.RemoveWorkflowFromListItem($_) }


Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>