Can we revert workflow to a previous version?

Tadz
Tera Guru
Tera Guru

Hi can we revert workflow to a previous version?

What would be best practice for having a back-up for workflow.

Thanks,

Tadz

1 ACCEPTED SOLUTION

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();


}


View solution in original post

17 REPLIES 17

Oh i see, thanks I'll try that.



Thanks,


Tadz


Could you please share sample code to achieve this?



If I raise a HI ticket, SN help desk will support us to revert the workflow?


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();


}


Thank you Kalai,



Its working.


Hi Kalai!!! It works like magic