Retiring multiple kb articles at one time

Cupcake
Mega Guru

We have about 400 kb articles that we want to retire. Is there any easy way to do a mass retirement of all of the items that is no longer required?

15 REPLIES 15

Maybe.   The instructions I had above was probably done on Eureka, so it may be something that has been closed since then.   It is now greyed out and uneditable in my Istanbul instance.   In my Geneva instance, I can mass edit the workflow field, so this must be rather new.


Workflow field is not editable.


Ashish Nahar
Kilo Guru

Hey, you can modify your UI action to be visible from the "list choice". and then select all and do mass retire, can be done up to 100. By this way, it will follow your workflow process as well and you are not doing anything incorrect which might happen using background script.



find_real_file.png



Please mark the answer correct or helpful if this helps.


Hello Ashish,

I enabled list choice filed in UI action. But it's not working. Can you please let me know if is there any other solution.

Thanks,

Ramesh

Sai Anna
ServiceNow Employee
ServiceNow Employee

Try this   fix script/background script




var kb = new GlideRecord('kb_knowledge');


kb.addEncodedQuery('ADD YOUR QUERY HERE');


kb.query();


if (kb.next()) {


  //Retiring articles


  gs.print(kb.number);


  kb.workflow_state='retired';   // Moving to Retired state


  kb.update();


}




Thanks,


Sai