Delete a Knowledge Base

sandraC
Tera Contributor

Hello,

We create several Knowledge Bases on TEST instance and we would like to delete them.

How can we do that? I Don't find. Please, be precise I am a novice.

Thanks a lot,

Sandra

1 ACCEPTED SOLUTION

Alberto Consonn
ServiceNow Employee
ServiceNow Employee

Hi Sandra,

As admin, run a background script to delete the specific record (be careful in doing it in production, please do first in test environment):

Go to System Definition > Scripts - Background, copy and paste the following script, replace the SYSID of your Knowledge Base (see image below) and press Run script:

var kbase = new GlideRecord('kb_knowledge_base');  
kbase.addQuery('sys_id', 'SYSID OF KB TO DELETE HERE');   // you can right click the kb record header to copy the sysID
kbase.query();   
while (kbase.next()) {  
    kbase.deleteRecord();  
}  

find_real_file.png

Done!!! Enjoy 🙂

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

View solution in original post

10 REPLIES 10

Jourdan Rothsc1
Tera Contributor

Worked as described above 

Thank you for the script. 

 

Jourdan