I want to create latest version of article only if I am the author of the article??

utsavjaiswa
Tera Contributor

Hello @Everyone

Is it possible that I can create a latest version of an published article only if I am the author of the article??

Please let me know your views
Thanks in Advance

Warm Regards

Utsav

4 REPLIES 4

Community Alums
Not applicable

@utsavjaiswa , You can modify UI action which runs for creating version by setting condition field to 

current.author == gs.getUserID()

OR run a Business rule to check if author is current logged in user then proceed with version creation else abort the action.

var original = new GlideRecord('kb_knowledge');
if (original.get(current.source_id)) {
if (original.author != gs.getUserID()) {
gs.addErrorMessage('Only the author of the article can create a new version.');
current.setAbortAction(true);
}

 

 

Community Alums
Not applicable

@utsavjaiswa, If my solution helped, mark it as the accepted solution and close the thread so that future learners can get the solution more easily.

Ankur Bawiskar
Tera Patron
Tera Patron

@utsavjaiswa 

this happens OOTB and you need not customize anything.

The OOTB UI action already checks this.

If that's not happening in your instance then see who updated the OOTB UI action condition

💡 If my response helped, please mark it as correct ✔️ and close the thread 🔒 — this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Community Alums
Not applicable

MIftikhar_0-1760358096580.png

Hi @Ankur Bawiskar, are you sure? Beth and the system admin can create versions of articles whose author is John Janson. So in my opinion an explicit script is needed to prevent version creation.