The CreatorCon Call for Content is officially open! Get started here.

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

1 REPLY 1

M Iftikhar
Giga Sage

@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);
}

 

 

Thanks & Regards,
Muhammad Iftikhar

If my response helped, please mark it as the accepted solution so others can benefit as well.