Jake Gillespie
Giga Guru

As discussed in my previous article Custom Tables: Where and when to build, Many to Many (M2M) Tables are one of the most common types of tables created in the Now Platform. In this article, we'll deep dive into their purpose, usage, and how they fit into the Custom Table family.

 

Custom Table Disclaimer

The creation and usage of custom tables is directly tied to ServiceNow subscription entitlements. The articles I've written in relation to custom tables are based on the ServiceNow Custom Table Guide, which is available via the Legal Schedules -> Entitlement Supplements page. I strongly recommend seeking guidance from the ServiceNow Accounts team as licensing rules, entitlement SKUs, and specific limits can change over time. At the time of writing, this version became effective October 17, 2025.

 

What Are Many to Many Tables?
A Many-to-Many Table is a custom table designed to act as a link between two or more existing tables. More specifically, it stores the relationship between records from each of those tables. Note that while they can link more than two records, the most common use case is to link just two. Another thing to note is that although you can create custom tables with two reference columns and call them Many to Many tables, ServiceNow will not see them this way. True Many to Many tables must be registered in the Many to Many Definition [sys_m2m] table. If you're new to this process, there is even a nice little template to help you build the definition! The core function of this table is to maintain a list of associations. If you have Table A (e.g., 'Projects') and Table B (e.g., 'Departments'), the M2M table holds records that link specific Project IDs to specific Department IDs, thereby defining the Many to Many relationship between them. A great example is the OOTB M2M table linking Users and Groups (aka Group Member [sys_user_grmember]).

 

When Do You Need Them?
The necessity of an M2M table arises when standard reference fields cannot accommodate your unique business logic (e.g. One to Many). If you attempt to model a complex relationship using only One to Many references, you risk data duplication or the inability to accurately represent all possible connections. It is also important to note that applications on the Now Platform ship with many OOTB relationships already defined. Before creating your own, check out the list of existing Many to Many Tables.

 

m2m_collections.png

Example Relationships for User [sys_user]

 

You should implement an M2M table when:
1. Complex Relationship Modelling is Required: Your process demands that records in Table A can be linked to multiple records in Table B, and vice versa (e.g., a single user belonging to multiple security groups).
2. Unique Data Scope Demands It: The relationship itself needs metadata—such as the date the association was made or the role of the link—which cannot be stored on either of the primary tables.

 

The Exempt Status: A Licensing Consideration
From a licensing perspective, M2M Tables hold an important status. As per the ServiceNow Custom Table Guide, they are classified as Exempt Tables. This exemption status means that they do not count against your overall Custom Table usage limit. This exemption is granted because the functionality of modelling complex relationships is deemed essential for maintaining system flexibility within the platform.

 

In summary, Many to Many Tables provide the necessary structural flexibility to model real-world complexity accurately. They allow developers and architects to build robust applications that reflect the true interconnected nature of business data without compromising on licensing or performance.