My user receives "You do not have permission to contibute to this knowledge base" message.

Student1
Tera Contributor

Hi all,

when I impersonate a user with itil role, once the incident is closed the user receives the following message "You do not have permission to contibute to this knowledge base".

 

What changes do I need to make to allow the user contibute to the KB?

1 ACCEPTED SOLUTION

Basically kb categories are stored in different table so you have glide record to that table and grab the sys_id of category

 

Here's the sample example

I tested it with 

incident category value = hardware

knowledge category value = hardware

 

 

 

var target = new GlideRecord('kb_category');

target.addQuery('value',current.category);  

//target.addQuery('label',current.category); //you can also use label

target.query();

if(target.next()) {

kb.kb_category = target.getUniqueValue();

 }

Regards

Pranav

 

View solution in original post

8 REPLIES 8

Pranav Bhagat
Kilo Sage

As  you don't have access to create knowledge article "can create" and "can contribute" because of these you are getting this error.

Add the user to user criteria of knowledge base.

 

Check this thread also

https://community.servicenow.com/community?id=community_question&sys_id=e502f820dbdb17401cd8a345ca9619b0

 

Regards

Pranav

Where can I find with which KB the incident table is related?

I mean when I close the incident, in which KB the article will be created? where can I found this?

There is a OOTB BR which handles the knowledge base

 

You can set this property glide.knowman.task_kb or update the code.

 

find_real_file.png

Regards

Pranav

I guess that's what I want 🙂

Another question, I want the article category to be the same with the incident category.

So, if I close an incident with category "Application", I want the article category to be "Application" too.

 

I made the following, but this didn't work.

 

var inc_Category=current.category;

kb.kb_category=inc_Category;

 

When I enter on the article form, I see the category as empty field.

 

However, if I make a query on script background and retrieve the article's category, I receive "Application" . Why is this happening?