Relate Knowledge Article to another

kittu1
Giga Contributor

Hi,

 

Is thir a way to relate one Knowledge Article to another? We have created a tab called "Related Knowledge Articles" which have the Edit and New buttons in the Related list.

 

When I select the "New" from Article "X" it creates an Article "Y" and X has the Y reference under "Related Knowledge Articles" tab. But Y doesnot hold the "X" reference.

 

Can we have a Client script or Business Rule which will link the two Articles (Article "X" should hold the "Y" reference and Article "Y" should have "X" reference uner this tab. Attaches the screenshot of Related List.

 

Can anyone help with the code to implement this.

 

Thanks,

Krishna.

 


6 REPLIES 6

Hi Bill Milhoan!



The response Slava provided gives great insight into adding these lists.   He provided this information: "If you need a many-to-many relationship, pairs of related articles have to be stored in a separate table. You can relateKnowledge [kb_knowledge] table to itself by creating an m2m table as explained in the following Wiki article: Creating a Many-to-Many Relationship - ServiceNow Wiki."



I do want to be clear on what it is you want, though.   When you say you'd like to see a list of related KB articles in a list to the right of the article, are you talking about on the article view or on the form?   The m2m table you create following the above instructions will be available on the knowledge form, but you can update the UI page to show this information on kb_view.



I hope that helps!


Britt Champeau


Britt,


I ran into an issue when I tried to create an M2M from kb_knowledge to kb_knowledge.   The process described in the wiki article you linked and this SNGuru article http://www.servicenowguru.com/system-definition/relationships/creating-manytomany-relationship-servi... both explain the process based on linking different tables.  


When I try to link, I get the error "M2M from field and M2M to field must be different." So instead, I tried to point "from" at knowledge and "to" at number, but it creates a weird effect.   There are two related lists that appear to have a parent/child relationship rather than a single list of "related knowledge.



Thoughts?