create new version of a article

v-paulp
Tera Contributor

Hi 

We have one requirement to create a new button on the kb article form and when user click on the button it will create a new version of the kb article and update some field of new version kb article and retire the old version of article.

 

I having issue with creating new version of the kb article, is there any in build api in servicenow by which new version can be created of a kb article?

 

Thanks

 

10 REPLIES 10

You can use the current 'checkout' code to create a new version and article (the version is also a record, not just a text field). Update the code to just move the valid_to a year and publish it.


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

v-paulp
Tera Contributor

Hi 

I did use same script include that use in checkout ui action(kbversioning). But it is not working if user don't have admin or knowledge_admin role.

Then you need to check on your ACL's and add one for the users that need to perform this as well. They probably miss the role to create a new version (as I said: the version is a record itself).


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @v-paulp 

 

May i know why there is need of new button. You are adding technical debt. we have OOTB retire button , which wil be good fit for you seems. 

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Hi 

Reason we are adding new button we want to skip the approval process ( which is require to published new version of article).