
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2022 01:41 AM
Dear experts,
Relationships:
Adding a Reference field on table A that points to table B, creates a relationship that ServiceNow can understand. This allows you to add a related list of records in table B, that displays the records from table A that are linked to it.
M2M table: Creating a M2M table via the sys_m2m relationship definition table also creates a relationship that ServiceNow can understand. Because of this, you can add a related list on either of the two tables linked by the relationship, to show related records from the other table.
Embedded list: When Table B has a reference to Table A, then on the form layout of Table A, Table B can be selected as an embedded list.
Given the above understanding, I have the following scenario and outcome. Help me understand please why this happens.
There are two custom tables created - u_table1 and u_table2.
When I define a M2M relationship between the two -
From: u_table1
To: u_table2
Question1: I fail to understand on what basis are the fields getting auto filled on m2m relationship. Is it on the basis of Display value. I checked that it gets auto-populated even for tables where no fields are set as Display value = true.
Getting back to the scenario - the m2m relationship being created, allows me to add u_table2 to be added as a embedded list on u_table1 and vice-versa.
Question 2: How is this possible?
That defeats the understanding that creating a m2m relationship allows one table to be a related list on the other, not as an embedded list. Embedded list is only possible when there is a reference field. But here none of the table is being referenced on the other table. Since, both tables are custom, there is no chance that either of these tables are referenced anywhere on the ServiceNow applications. How doe this still become possible?
Question 3: Check the below snapshot.
These are all embedded lists on the incident table, just picked the first few listed there.
There are A-->B (which are related lists) entries and entries like "Affected Locations" (Reference fields). So, does it mean every related list can be defined as an embedded list as well?
Question 4: What does the module Related list contain? Is every related list of all application tables stored here?
Best Regards,
Anish
Solved! Go to Solution.
- Labels:
-
Platform and Cloud Security

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2022 02:20 AM
I will try to answer your questions to the best of my knowledge:
A1 - Display value doesn't work only if you set the display value for a specific table.
Reference fields look for the display value in the following order:
- A field with display=true in the system dictionary on the lowest sub-table for extended tables.
- A field with display=true in the system dictionary on the parent table.
- A field named name or u_name.
- The Created on field of the referenced record.
A2 - Below articles should help:
https://community.servicenow.com/community?id=community_question&sys_id=fc15d5eb1bdce410305fea89bd4bcb8d
https://community.servicenow.com/community?id=community_question&sys_id=a271a035db665380200f0b55ca9619aa
A3 - So, does it mean every related list can be defined as an embedded list as well? ---- YES
A4 - What does the module Related list contain? Is every related list of all application tables stored here? ----YES
For custom ones, you have "Relationship" module as well
Aman Kumar

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2022 03:18 AM
One more interesting thing observed is that When Table_A references Table_B, the embedded list entry on Table B reads in the following format:
Table_A --> Reference_fieldLabel_on_Table_A
E.g. Incident --> Assigned to on the User (referenced) table.
Cheers,
Anish

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2022 08:23 PM
Got some more info on this topic and thought could share here for anyone else's future reference before I close the thread:
All related lists by default will be available for selection as an embedded list as well.