
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-06-2016 08:31 PM
Hi can we revert workflow to a previous version?
What would be best practice for having a back-up for workflow.
Thanks,
Tadz
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-17-2016 03:05 AM
For deactivating the current.
var getInc = new GlideRecord('wf_workflow_version');
if(getInc.get('3b95753ad0d60200085a28e2b5794e1e')) //change
{
getInc.published=false;
getInc.update();
}
To publish old one
var getInc = new GlideRecord('wf_workflow_version');
if(getInc.get('3b95753ad0d60200085a28e2b5794e1e')) //change
{
getInc.published=true;
getInc.update();
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-29-2017 02:59 PM
great!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-01-2017 09:51 AM
Holy most helpful post ever Batman....why isn't this documented somewhere!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-01-2017 10:40 AM
Because it is a hack
Thanks for digging this up. Will create a small utility and post it here.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-24-2020 05:34 AM
If you still just want to use this script (i.e. storing as as a fix script) instead of installing it as a UI action from the blog post in this thread, this is how I got the sys_ids.
Go to "Workflow Versions" and change the record filter to include unpublished (i.e. "All" and filter to contain the workflow name). The copy the URL for the two records to a notepad to extract the sysIDs.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-04-2017 03:11 AM
Converted this to a platform solution instead of ad-hoc scripts. It is available here if someone is interested.
Unlearn Series - Reverting Workflow Version