M2M relationship not working

Arijit Saikia
Tera Contributor

Hi,

We have a table called u_support_case_management which extends the task table.

 

When I link an Incident from the related list of the Support Case Management form, and then navigate to that particular Incident, the relationship is not working.

It should be Many to Many relationship both ways - an Incident should be able to be linked to multiple Support Cases and vice cersa.

When I add a Support Case to an Incident via the related list called Support Case Management on the Incident form and then navigate to the Support Case and check in the Incident related list it does not appear.

Also when I add an Incident via the Incident Related List in the Support Case form and then navigate to the Incident, the Support Case number does not appear under the Related List for Support Case Managament.

Example I have added INC0016922 to Support Case SCM0000478 via related list, but when I navigate to INC0016922 and check for the Support Case Management m2m list it does not appear.


I have created a m2m relationship, refer attachment.

Refer to screenshots for all details.

1 ACCEPTED SOLUTION

Abhishek Singh6
Kilo Guru

Hi @Arijit Saikia,

On Support Case Form, You are referring to wrong related list. The related list which you are referring to is OOTB and shows 1:Many relationship between Incident to Incident table (Parent - Child Relationship).

 

I have tried to replicate the your scenario on my PDI and I am able to see the related records on both Forms (Incident and Support Case).

 

Note : You don't have to create any relationships or anything. All related list are automatically created by system as soon as you create m2m relationship.

 

You have to select below related list on both forms :

 

Incident Form

Note : I think you have selected correct related list on Incident form but still confirm once.

1) Open Incident Form.

2) Click on Context menu/Hamburger. Select Configure --> Related List.

Screenshot 2023-03-08 at 11.13.34 AM.png

3) Move Below Related List from Left to Right.

Screenshot 2023-03-08 at 11.15.31 AM.png

Support Case Form

Note : This is where you are referring to wrong related list.

1) Open Support Case Form.

2) Click on Context menu/Hamburger. Select Configure --> Related List.

Screenshot 2023-03-08 at 11.20.00 AM.png

3) Move Below Related List from Left to Right.

 

Screenshot 2023-03-08 at 11.21.44 AM.png

Note : You can add as many related list you want as per the requirement. I have just added one RL.

 

After Adding the related Lists on both form, It will look like below :

Incident

Screenshot 2023-03-08 at 11.26.39 AM.png

Support Case

Screenshot 2023-03-08 at 11.28.23 AM.png

Please follow above steps and let me know if you are still facing the issue.

 

Please mark helpful and accept solution if it helped you.

View solution in original post

3 REPLIES 3

Abhishek Singh6
Kilo Guru

Hi @Arijit Saikia,

On Support Case Form, You are referring to wrong related list. The related list which you are referring to is OOTB and shows 1:Many relationship between Incident to Incident table (Parent - Child Relationship).

 

I have tried to replicate the your scenario on my PDI and I am able to see the related records on both Forms (Incident and Support Case).

 

Note : You don't have to create any relationships or anything. All related list are automatically created by system as soon as you create m2m relationship.

 

You have to select below related list on both forms :

 

Incident Form

Note : I think you have selected correct related list on Incident form but still confirm once.

1) Open Incident Form.

2) Click on Context menu/Hamburger. Select Configure --> Related List.

Screenshot 2023-03-08 at 11.13.34 AM.png

3) Move Below Related List from Left to Right.

Screenshot 2023-03-08 at 11.15.31 AM.png

Support Case Form

Note : This is where you are referring to wrong related list.

1) Open Support Case Form.

2) Click on Context menu/Hamburger. Select Configure --> Related List.

Screenshot 2023-03-08 at 11.20.00 AM.png

3) Move Below Related List from Left to Right.

 

Screenshot 2023-03-08 at 11.21.44 AM.png

Note : You can add as many related list you want as per the requirement. I have just added one RL.

 

After Adding the related Lists on both form, It will look like below :

Incident

Screenshot 2023-03-08 at 11.26.39 AM.png

Support Case

Screenshot 2023-03-08 at 11.28.23 AM.png

Please follow above steps and let me know if you are still facing the issue.

 

Please mark helpful and accept solution if it helped you.

@Abhishek Singh6  

The solution works fine for admin users.

When itil users check the Support Case, the Incident that I had linked does not appear. I have created ACLs as well, still does not work. Can you suggest?

Thanks.

Arijit Saikia
Tera Contributor

Hi @Abhishek Singh6 

Thanks once again for your solution for this question.

 

I have recently posted a query regarding dependent Select Box for Catalog Item. In case you check this let me know if you can assist with it.

Catalog Item Client Script for Dependent Drop Down... - ServiceNow Community