The Zurich release has arrived! Interested in new features and functionalities? Click here for more

Viewing an article says - 'You do not have sufficient privileges to access this knowledge item'

Suggy
Giga Sage

Viewing an article says - 'You do not have sufficient privileges to access this knowledge item'

 

Scenario and Reason for this issue in our case:

End users had bookmarked few articles. When the users opened those links it says

Suggy_0-1757488543231.png

Reason - Those articles are actually retired!

 

Issue - It gives wrong impression to the users right? They are creating incidents and Service requests saying - give me the privileges/role to view those articles.

But in reality, they are retired and nothing to with privileges or roles.

 

Why such a message by ServiceNow OOTB?

 

Question - How/where can I change this message?

 

1 ACCEPTED SOLUTION

Nehal Dhuri
Mega Sage

You might need to update the 'Knowledge Article Content' widget code to make your expected changes.

NehalDhuri_0-1757491860389.png

 

Please hit like and mark my response as correct if that helps

View solution in original post

10 REPLIES 10

Hi Suggy,

I have a similar requirement. Can you please let me know what changes did you do? Is it working ? I tried something but the knowledgeRecord is giving me null value every time for retired article on portal.

 

Thanks,

Harsha

Hi @Harsha34 
Use the following code in the else part at line no 198:

if(!kbViewModel.canAccessRetiredArticle(kbViewModel.knowledgeRecord)){
	data.messages.INSUFFICIENT_PREVILEGES = gs.getMessage("This article is retired");
}else {
	data.messages.INSUFFICIENT_PREVILEGES = gs.getMessage("You do not have sufficient privileges to access this knowledge item");
	data.messages.RECORD_NOT_FOUND = gs.getMessage("Knowledge record not found");
}

 

Screenshot for reference:

NehalDhuri_0-1758115441587.png

 

NehalDhuri_1-1758115450526.png

 

Please hit like and mark my response as correct if that helps

Hi Nehal,

This is wonderful, it worked for retired articles but this message is also overriding another message i.e. "You do not have privileges", do you have an idea why is this happening?

Ideally if the person has can read access to that article they can view it but if they are not in it the message "You do..." should come , now the message is coming but the issue got exchanged

Hi @Suggy ,

We have ran into similar issue, can you please assist us what changes we must do ?

 

Thanks,

Akash Srivastav.

@AkashS531332023  its answered by @Nehal Dhuri  and  I have already marked it as correct solution.

Are you looking for something else?