- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-25-2015 03:09 PM
I have two tables let's say A and B. There is a ralationship table C. A and B is many to many relationship.
I have a related list of B under A's form. But there is no edit button for this related list so I clicked the enable edit. After I clicked the enable edit button, the edit button shows up. However, the slushbucket in the list is not correct. It's showing all the records in table C. I want records from table B actually. How can I fix this?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-14-2015 02:49 PM
I ran into the exact same issue. I wanted a clean, intuitive solution for my end users. After I created my own many-to-many table and tried creating a custom 'edit' UI action (unsuccessfully) I found this:
http://wiki.servicenow.com/index.php?title=Creating_a_Many-to-Many_Relationship#gsc.tab=0
This is out-of-box functionality and it does all the work for you. You add a 'to' and 'from' table and customize the labels, and the system does all the rest. You need to add a related list (has the same name as the label you assigned, not the '>' separated names that most related lists have) and the Edit button is there. It will open a slushbucket of the A or B records, and the C record is created behind the curtains.
Hope this helps! Took me about a day of dev to stumble across it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-07-2025 09:24 AM
Hi @Mudabir ,
This is the current documentation for Many to Many Definitions (sys_m2m): https://www.servicenow.com/docs/bundle/vancouver-platform-administration/page/administer/table-admin...
The fields on that form aren't always intuitive, so I like to test it out in a PDI first, then once you understand the 'to' and 'from' values, implement in your environment.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-10-2025 11:40 PM
Hello @ZacharyB8622373 @Zach Biewend1
Creating a relationship in sys_m2m table did not serve me well. I tried all combinations for "From" "To" but the slush bucket, upon pressing "Edit" button, was showing the records from "To" table and records were getting created in a separate table (new m2m table defined in definition).
So I created a record in sys_collection table and it works like a charm.
However, ServiceNow docs mention to not create a record here and use sys_m2m table, so I was hoping if you could tell whether it took the right route. 🙂