How can you change the author of a knowledge article?

jlkanaka
Kilo Contributor

Some of the original authors of a knowledge article are no longer with us. How can we change the value for that field?

4 REPLIES 4

sachin_namjoshi
Kilo Patron
Kilo Patron

Please open knowledge article and update author using below

 

kb_knowledge.LIST

 

find_real_file.png

 

Regards,

Sachin

Trupti6
Tera Expert

Hi,

If you have admin role you will able to change the author name by navigating to kb_knowledge table

asifnoor
Kilo Patron

Hi,

You cannot update the author directly from kb_knowledge.list if the knowledge is in the published state.

You can use the script to update them. Assuming the users who have left the organization are still existing as inactive users in the system, try this code.

var gr = new GlideRecord("sys_user");
gr.addInactiveQuery();
gr.query();
var inactiveUsers = [];
while(gr.next()) {
inactiveUsers.push(gr.getValue("sys_id"));
}
gs.print("inactive users are"+inactiveUsers);

var gr1 = new GlideRecord("kb_knowledge");
gr1.addQuery("author","IN",inactiveUsers);
gr1.query();
while(gr1.next()) {
 gs.print("kb article is"+gr1.getValue("number"));
 gr1.setValue("author","62826bf03710200044e0bfc8bcbe5df1"); //update the sys_id of the user you want to set the author to.
 gr1.update();
}

 

 

Kindly mark the comment as a correct answer and also helpful once worked.

 

but newly added author not able to access the article what earlier author has an access.

Meaning is most of the fields are grayed out. 

Checked both roles and groups access its ok.