how to update author to who has published article

Ash41
Kilo Sage

Hi Team, 

 

I want to update author of KB article person who publish the Article.

 

Please suggest

2 ACCEPTED SOLUTIONS

Zach Koch
Giga Sage
Giga Sage

Take a look at this KB. It should help you with your question. 

KB article 

Here is a screenshot of the relevant info

ZachKoch_0-1718292805870.png

 

If this information helped resolve your issue, please remember to mark response correct and thumbs up to help future community members on this information, thanks!

View solution in original post

Hi @Ash41,

 

Happy to help find a solution. Happy Friday and coding.

 

To help others (or for me to help you more directly), please mark this response correct by clicking on Accept as Solution and/or Kudos.


Thanks, Robbie

View solution in original post

5 REPLIES 5

Robbie
Kilo Patron
Kilo Patron

Hi @Ash41,

 

Is this a one off task/activity or something that will be required moving forward. Typically the Knowledge Base (KB) process would dictate that any update to a Published article would require the article to be Checked Out, updated and the re Published.

 

However, it is not uncommon to require meta data or specifics to be updated whilst leaving the article within a Published state. (Please consider any changes and any potential impact when updating)

 

Below is a Background Script that can be ran for a one off update for you use case.

To help others (or for me to help you more directly), please mark this response correct by clicking on Accept as Solution and/or Kudos.


Thanks, Robbie

 

var article = 'b8a41f8997b2ce1032ea7a200153afd6'; //The sys_id of the specific KB article to update
var kbGR = new GlideRecord('kb_knowledge');
if(kbGR.get(article)){
  gs.print('Check article number is as expected - ' + kbGR.number);
  kbGR.author = '62826bf03710200044e0bfc8bcbe5df1'; //The sys_id of the new/updated author
  kbGR.setWorkflow(false);
  //kbGR.update(); //Uncomment this line to run the update
}

 

 

Thank you, Robbie! 🙂

Hi @Ash41,

 

Happy to help find a solution. Happy Friday and coding.

 

To help others (or for me to help you more directly), please mark this response correct by clicking on Accept as Solution and/or Kudos.


Thanks, Robbie

Zach Koch
Giga Sage
Giga Sage

Take a look at this KB. It should help you with your question. 

KB article 

Here is a screenshot of the relevant info

ZachKoch_0-1718292805870.png

 

If this information helped resolve your issue, please remember to mark response correct and thumbs up to help future community members on this information, thanks!