Attached Knowledge tab not visible on form load for incident form

swez
Tera Contributor

Hello Team,

i need below help, on Incident form I want "Attached Knowledge" tab under Related lists. Along with this tab I also need an EDIT button so that KB articles can be added by users. However when I edit related list and try to add attached knowledge tab, the edit button disappear and in order to get edit button i need to add one more Attached Knowledge tab.

so ideally there are two Attached Knowledge tab available in related list. even if i try to remove both of the attached knowledge tab disappear. Could you please tell me:

1. How do I get edit button on Attached Knowledge on related list tab?

2. i need the Attached knowledge tab to be visible when form loads. 

 

Please help, 

1 ACCEPTED SOLUTION

Maik Skoddow
Tera Patron
Tera Patron

Hi,

this is a really crazy issue and after playing around for about two hours I have headaches.

The situation is as follows:

(1) Relation between task and knowledge articles

Tasks (incidents, changes, problems, etc.) are connected to knowledge articles by a so called many-to-many relation via table m2m_kb_task. That means, each time you click on "Attach" an entry is created in that table.

 

(2) Origin of the two related lists "Attached Knowledge"

One related list (later called "RL 1") comes from table sys_collection. This is a internal table for OOTB many-to-many relationships. Also well known releations such as "user has roles" or "user is member of groups" are defined here. 

Tip: Rename the record for "Attached Knowledge" in order to see the difference with the second related list.

find_real_file.png

 

Another related list (later called "RL 2") is defined at "System Definition > Relationships" (table sys_relationship)

Records in that table normally represent one-to-many relations.

find_real_file.png

 

(3) Comparison

So, why, you may ask, there are two different types of related lists and what are the differences?

RL 1 only can display the contents of table m2m_kb_task so only the reference to knowledge article and the common meta data (updated, created, etc)

But RL 2 can display all fields of knowledge articles.

And you can see another difference: RL 1 has the "Edit" and "New" buttons but RL doesn't have. I will skip a description at this point, because it would be very technical

 

(4) Problematic incident form

I don't why but the incident form seems to be the only one where RL 1 is not displayed in case there are no attached knowledge articles. With at least one attached KB article the related list is offered. This is exactly what you have already observed. But how to attach KB articles when the related list is not offered?

 

(5) Workaround

Go to table sys_relationship and create another related list for attached knowlegde articles:

find_real_file.png

 

Applies to table: incident

Queries from table : m2m_kb_task

Query with:

(function refineQuery(current, parent) {

	current.addQuery("task", parent.sys_id);
	
})(current, parent);

 

After configuring at incident form the related list should look like this:

find_real_file.png

 

Now you can add knowledge articles but one after another.

View solution in original post

3 REPLIES 3

Maik Skoddow
Tera Patron
Tera Patron

Hi,

this is a really crazy issue and after playing around for about two hours I have headaches.

The situation is as follows:

(1) Relation between task and knowledge articles

Tasks (incidents, changes, problems, etc.) are connected to knowledge articles by a so called many-to-many relation via table m2m_kb_task. That means, each time you click on "Attach" an entry is created in that table.

 

(2) Origin of the two related lists "Attached Knowledge"

One related list (later called "RL 1") comes from table sys_collection. This is a internal table for OOTB many-to-many relationships. Also well known releations such as "user has roles" or "user is member of groups" are defined here. 

Tip: Rename the record for "Attached Knowledge" in order to see the difference with the second related list.

find_real_file.png

 

Another related list (later called "RL 2") is defined at "System Definition > Relationships" (table sys_relationship)

Records in that table normally represent one-to-many relations.

find_real_file.png

 

(3) Comparison

So, why, you may ask, there are two different types of related lists and what are the differences?

RL 1 only can display the contents of table m2m_kb_task so only the reference to knowledge article and the common meta data (updated, created, etc)

But RL 2 can display all fields of knowledge articles.

And you can see another difference: RL 1 has the "Edit" and "New" buttons but RL doesn't have. I will skip a description at this point, because it would be very technical

 

(4) Problematic incident form

I don't why but the incident form seems to be the only one where RL 1 is not displayed in case there are no attached knowledge articles. With at least one attached KB article the related list is offered. This is exactly what you have already observed. But how to attach KB articles when the related list is not offered?

 

(5) Workaround

Go to table sys_relationship and create another related list for attached knowlegde articles:

find_real_file.png

 

Applies to table: incident

Queries from table : m2m_kb_task

Query with:

(function refineQuery(current, parent) {

	current.addQuery("task", parent.sys_id);
	
})(current, parent);

 

After configuring at incident form the related list should look like this:

find_real_file.png

 

Now you can add knowledge articles but one after another.

Hi @swez 

Did my reply answer your question?

If so, please mark appropriate response as correct so that the question will appear as resolved for others who may have a similar question in the future.

If not, please tell me what is still missing.

Kind regards
Maik

Thank you so much this helped.