Which one should I use task_rel_kb table or m2m_kb_task table?

Masa4
Giga Contributor

I would like to allow to add relationship between incident_task and kb_knowledge to the user who has role "snc_internal" in the "Incident Task" record form.

And I assume that this user has not role "admin".

Which one should I use task_rel_kb table or m2m_kb_task table in this case?

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

You can create relationship between incident and kb_knowledge using 2 ways

1) kb_knowledge table has Source Task field which gets populated with INC

-> this happens when incident is closed with the Knowledge checkbox as true

OR

2) use the table m2m_kb_task which stores the mapping of INC and KB

-> this happens when you attach knowledge using the Related Search result

Regards
Ankur

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

View solution in original post

8 REPLIES 8

Harika Bhupathi
Giga Guru

Hi @Masa 

The m2m_kb_task table functions as an intermediary table that simply records which KBs were used in which Task (or Task-extended) table. For example, if a User attaches a KB article to an Incident, this would trigger the script and generate the associated m2m_kb_task record.

 

You need to use m2m_kb_task

 

Please mark my answer correct/helpful , if applicable

 

BR,

Harika

Hi Harika

Thanks for your comments.

What operation do you assume to attach KB in incident form?

I’m sorry, I did not get that.

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

You can create relationship between incident and kb_knowledge using 2 ways

1) kb_knowledge table has Source Task field which gets populated with INC

-> this happens when incident is closed with the Knowledge checkbox as true

OR

2) use the table m2m_kb_task which stores the mapping of INC and KB

-> this happens when you attach knowledge using the Related Search result

Regards
Ankur

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

Hi Ankur,

Thanks for your comments.

> 2) use the table m2m_kb_task which stores the mapping of INC and KB

Can I do this in "Incident Task" table?

BR,