Get a first look at what's coming. The Developer Passport Australia Release Preview kicks off March 12. Dive in! 

Help !!! How does one delete knowledge base templates and start from scratch?

Pakuaman
Tera Contributor

Hi . Does anyone know how to delete an KB article template  ? I am at home working in dev but at work ( in test ) I began creating article templates for my employer and somehow I managed to create a situation where , when I click on create new article template I dont get the original pristine form. I get a form that has the top header but it has a prefilled template ( problem - solution ) at the bottom, a schema of a template that I had created once and now it comes up every time. I just want to revert back to a simple ,happy place where I can create KB article templates as I now am following the Servicenow directions explicitly and have no problem in dev. Somehow I messed up the table structure at work ( I think ) some how so cannot simply create a KB article template from scratch.

I would really appreciate any help. I cannot find anyway to delete any of my corrupted templates and I cannot figure how to revert back to the original knowledge base template form to start creating from scratch.

Thanks

Rodger

 

1 ACCEPTED SOLUTION

Why not version them. So that you know which is the latest one. For ex. Problem - Resolution V1, Problem - Resolution V2 and so on. And keep the current one as Problem - Resolution. If the current one you want to retire tomorrow, rename it to Problem - Resolution V3 and name the current one as Problem - Resolution.


Please mark this response as correct or helpful if it assisted you with your question.

View solution in original post

5 REPLIES 5

gregmest
Tera Contributor

I ran into this issue on a new implementation. There is value in keeping your instance "clean"; i.e. removing artifacts of trial-and-error or just plain mistakes. To this end, I was able to easily remove the unwanted Knowledge Templates doing the following:

  1. Note the template tables being used by the unwanted templates. Check if they are unused by any other template. ("Template table" in the "kb_article_template" records.
     
    gregmest_0-1767730586608.png
  2. Add new "delete" ACLs to the "kb_article_template" and "kb_article_template_definition" tables.  Versions of these already exist with "nobody" as the required role. I created new ACLs and gave it to the "admin" role.
  3. Delete the undesired records from the "kb_article_template" and "kb_article_template_definition" tables.
  4. Delete the tables noted in step 1 (listed in the sys_db_object table).

It's as simple as this. A few notes:

  • You need the admin and security_admin roles to do this (and elevate to security_admin for the ACL work).
  • Adding a new ACL with permissions to do what you want overrides the out-of-box ACLs, without needing to touch the latter (staying "out of the box"). (Your permission is granted by the "most permissive" ACL.)
  • Of course when you're done with this, delete or deactivate the ACLs you created. I added a description to each like "Temporary delete access control on kb_article_template. Only activate if you need to delete a template rather than inactivate it.", and deactivated the ACLs when I was done. (Now we're back to out of the box for all intents and purposes.)