Related list filter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2025 08:52 AM
Hello All,
I have a custom object u_order_form. I have a m:m relationship between this custom object and alm_license using the junction table u_order_license. order_id in u_order_license connects to u_order_form and lic_id in u_order_license connects to alm_license table. I have a form view with a record from u_order_form on top and OOTB related list showing records from the junction table - u_order_license. This related list has a OOTB New button that allows me to associate more licenses to the order form. I want to add a filter to this process -when the form view for adding a new license opens and user clicks on the License field (lic_id reference field to alm_license table) it should only bring up list of licenses that are not already associated with the parent order. I tried creating a new relationship from System Definition -> Relationships but I'm not able to add this as a related list to my form view as a related list (not sure why). I need advice for the following -
1. Is this approach of using Relationships the right away? If not what are the alternate approaches?
2. Why am I not being able to see this new Relationship as a related list when I try to configure and add it to my form layout from the custom object view?
3. Below is the query I used in my relationship. Is this correct?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2025 09:05 AM
which table is selected in "Applies to table" ? That table's form will have that related list
Why not use this?
1) reference qualifier
2) dynamic filter
No need to create defined relationship for M:M tables.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2025 10:50 AM
Hi @shalurajeev ,
For defining relationship you do not need to manually develop relationship using scripting. U can directly use related list for this purpose which you will get in configure-> related lists.
If you find my answer useful please mark it helpful and accept it as solution.
Thanks and regards
Nitya Bansal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2025 11:33 AM
To define a relationship between tables, you don't need to write custom scripts manually. Instead, you can simply use the Related Lists feature available through Configure → Related Lists, which allows you to easily establish and manage relationships directly from the UI.