
- 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
‎09-06-2016 09:59 PM
There will be always backup of previous workflow in wf_workflow_version table.
Remove all the filters by clicking 'All' in the navigation. Search the version you need and change the published column to true. (only one record in the version should be true for a given workflow)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-06-2016 10:14 PM
Thanks Kalaiarasan, will try that
I'll update you once done.
Thanks,
Tadz

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-06-2016 11:58 PM
Hi Kalaiarasan,
I can't published the old workflow version.
and I can't unpublished the new workflow version.
Should i delete the newer one?
Thanks,
Tadz

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-07-2016 12:07 AM
You cannot do this via UI. Use background script to change the published column value of the required version.