Can You Update the Parent ID of a Knowledge Category to "Move" It?

Nick Peters
Tera Guru

We have a requirement for a handful of Knowledge Bases that requires us to move a subcategory to a new category - however, the Parent ID field is read-only. In my researching, it doesn't appear that there is an intended way to "move" knowledge categories.

Is it safe to update the Parent ID field with a Fix Script after creating the new category? I am just wondering if there would be adverse side effects from doing this.

1 ACCEPTED SOLUTION

brandont
Tera Expert

I would not update the parent to try to move them but instead just create the new category you want then update all the articles to be in that category seems like a safer approach.


find_real_file.png


find_real_file.png


find_real_file.png


find_real_file.png


find_real_file.png


In this example I moved all the articles from the email category to the Android2 category. Which changed where they where located in the knowledge base.


View solution in original post

3 REPLIES 3

adamjgreenberg
ServiceNow Employee
ServiceNow Employee

Nick,



You could update the parent but you'll need to know the very specific sys_id of the parent (kb_category) to update the kb_knowledge table.



Of course, you'll want to test this in a subprod or dev instance before rolling this out to production.



This example is an OOB kb_knowledge table.



Screen Shot 2018-02-01 at 11.21.11 AM.png


brandont
Tera Expert

I would not update the parent to try to move them but instead just create the new category you want then update all the articles to be in that category seems like a safer approach.


find_real_file.png


find_real_file.png


find_real_file.png


find_real_file.png


find_real_file.png


In this example I moved all the articles from the email category to the Android2 category. Which changed where they where located in the knowledge base.


VaranAwesomenow
Mega Sage

Is the new category child of an existing category or is it the first level category ? Depending on that you need to update the fields


parent_id with


case1:         the sys_id of the category ( if the parent is a category)


case2:           the sys_id of the knowledge_base( if the parent is the top most category)



Update the parent_table with kb_category in case1


update the parent_table with kb_knowledge_base in case2