- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2019 10:23 AM
Hello There
I have a Knowledge article where state is set to review , even though its approved , not sure where to check the workflow ,for a work around how to update the workflow status to published just for that kb article using fix script ?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2019 10:49 AM
Hey Kam,
Create a fix script with below script and make few changes as per your requirements.
var kb = new GlideRecord("kb_knowledge");
kb.addEncodedQuery("number=KB0010002"); // change the article number
kb.query();
if(kb.next()){
kb.workflow_state="published";
kb.update();
kb.setWorkflow(false);
}
i hope this will helpful to you, let me know if you need more details.
Thanks,
Rajashekhar Mushke
Community Leader
Thanks,
Rajashekhar Mushke
Rising star : 2022 - 2024
Community Leader -2018
Connect me on LinkedIn : Rajashekhar Mushke
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2019 10:39 AM
Hi,
use this script as example and run it as Fix Scripts:
var gr = new GlideRecord('kb_knowledge');
gr.addQuery('sys_id','<enter the sys_id of the kb article>');
gr.query();
while(gr.next())
{
gr.workflow_state = 'published';
gr.update();
}
If I have answered your question, please mark my response as correct so that others with the same question in the future can find it quickly and that it gets removed from the Unanswered list.
Thank you
Cheers
Alberto
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2019 10:49 AM
Hey Kam,
Create a fix script with below script and make few changes as per your requirements.
var kb = new GlideRecord("kb_knowledge");
kb.addEncodedQuery("number=KB0010002"); // change the article number
kb.query();
if(kb.next()){
kb.workflow_state="published";
kb.update();
kb.setWorkflow(false);
}
i hope this will helpful to you, let me know if you need more details.
Thanks,
Rajashekhar Mushke
Community Leader
Thanks,
Rajashekhar Mushke
Rising star : 2022 - 2024
Community Leader -2018
Connect me on LinkedIn : Rajashekhar Mushke
