Find 'Previous Versions' workflows on a list

Document created by vacoder on Sep 5, 2017
Version 1Show Document
  • View in full screen mode

When a new version of a, workflow is published any items still running a workflow will keep using the previous version until it completes  The trouble is that sometimes they do not complete because they have encountered an error. The Workflow Settings view doesn't tell you what items those workflows are running against. In the image below I can see that a version from 9 months ago is still running on 3 items:

 

Presvious Versions

This script will take a client subdomain (easily changed to be a site url) and the name of a list that is running the previous versions. It will loop through each item in the list and will give you the ID of the item that is running the workflow. Then you can go to that item, investigate reason it hasn't completed and take appropriate actions to resolve it.

Attachments

Outcomes