Skip to page contentSkip to chat
ServiceNow support
    • Community
      Ask questions, give advice, and connect with fellow ServiceNow professionals.
      Developer
      Build, test, and deploy applications
      Documentation
      Find detailed information about ServiceNow products, apps, features, and releases.
      Impact
      Accelerate ROI and amplify your expertise.
      Learning
      Build skills with instructor-led and online training.
      Partner
      Grow your business with promotions, news, and marketing tools
      ServiceNow
      Learn about ServiceNow products & solutions.
      Store
      Download certified apps and integrations that complement ServiceNow.
      Support
      Manage your instances, access self-help, and get technical support.
Many-to-many related list does not automatically update when changes are made - Known Error
  • >
  • Knowledge Base
  • >
  • Known Error (Knowledge Base)
  • >
  • Many-to-many related list does not automatically update when changes are made
KB0621171

Many-to-many related list does not automatically update when changes are made


3985 Views Last updated : Apr 8, 2025 public Copy Permalink
KB Summary by Now Assist

Description

Many-to-many related list does not automatically update when changes are made.

Steps to Reproduce

 

On a Geneva Patch 8 instance:

  1. Create Kits table.
    1. Navigate to System Definition > Tables.
    2. Click New. 
    3. Create a table with the following values and click Submit: 
      • Label: Kits
      • Name: u_kits
      • Extends Table: Hardware
  2. Create a many-to-many relationship for this Kits table.
    1. Enter sys_m2m.list in the navigation filter.
    2. Click New.
    3. Enter the following information and then click Create Many to Many.

      This creates a table called u_m2m_hardware_kits as a result.

      • From table: Kits [u_kits]
      • To table: Hardware [cmdb_ci_hardware] 
  3. Activate audit on the Kits table.
    1. Navigate to System Definition > Dictionary.
    2. Find the entry for the u_kits table with type = collection.
    3. Check the Audit check box and click Update.
  4. Activate audit on u_m2m_hardware_kits table.
    1. Navigate to System Definition > Dictionary.
    2. Find the entry for the u_m2m_hardware_kits table with type = collection
    3. Check the Audit checkbox and click Update.
  5. Create a new Kits record.
    1. Navigate to Kits > Kits.
    2. Click New.
    3. In the Name field, add "Test Kit" and save the record.
    4. Open Configure > Related Lists.
    5. Select Hardware in the slushbucket and click Save. 
    6. In the Hardware related list, click Edit.
    7. In the Collection list, select the first five records and move them to the Test Kit list and click Save.
  6. Verify the XML and history of these changes.
    1. In the Kits record, right-click the header and select Show XML.

      Note that the sys_updated_on = sys_created_on, and sys_mod_count = 0.

    2. In the Kits record, right-click the header and select History > List.

      Note that there are only updates with an Update number of 0.

  7. Delete the history to re-generate it.
    1. In the record history, click Delete.
    2. Navigate back to the Kits record.
    3. Right-click on the header and select History > List.

      Note that there are now five records with a label of Relation, a type of Relation, and an update number of -1. The relation records appear in the history only if the existing history is deleted and re-created.

Workaround

By default, insertions are not audited for any table. To enable auditing of insertions, set the glide.sys.audit_inserts system property to true. 

To cause the many-to-many related list to automatically update, create a business rule to run on the many-to-many table on insert, update, and delete that does one of the following: 

  • Sets the sys_updated_time of the parent record to the current time, which causes the history set for the parent record to regenerate.
  • Delete the history set for the parent record, which forces the history set to regenerate.  

 


Related Problem: PRB744027

The world works with ServiceNow.

Sign in for more! There's more content available only to authenticated users Sign in for more!
Did this KB article help you?
Did this KB article help you?

How would you rate your Now Support digital experience?

*

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

What can we improve? Please select all that apply.

What are we doing well? Please select all that apply.

Tell us more

*

Do you expect a response from this feedback?

  • Terms and conditions
  • Privacy statement
  • GDPR
  • Cookie policy
  • © 2025 ServiceNow. All rights reserved.