Deleting records from 'Idea Categories' table breaks the associated idea record audit history and the activity stream.DescriptionDeleting records from the Idea Categories table breaks the associated idea record audit history and activity stream.Root cause of Issue:On "im_m2m_idea_category.xml" table we have mtom attributes set.<element label="Idea" name="idea" type="reference" reference="im_idea_core" display="true" mandatory="true" reference_cascade_rule="delete" mtom="Categories"/><element name="category_id" type="document_id" dependent="category_table" label="Category" mandatory="true" reference_cascade_rule="delete" mtom="Ideas"/>These attributes create entries in sys_collections. But entries in sys_collections should only be created for reference fields and not the document_id field. Hence, invalid entries was stored in this table. Audit relies on this table to create audit logs. Hence, these invalid entries are breaking audit, which in turn is breaking the activity stream.Fix:1) Remove mtom attributes from our dictionary entries (this will be a complete fix for new customers).2) Provide a FIX Script for the upgrade customers to make the dictionary changes and delete invalid entries from sys_collections.Issue Fixed in Australia. Steps to Reproduce 1. Create a new Idea record in the idea table.2. Create records in the Idea Categories (im_m2m_idea_category) table that map the idea created in step 1 to Idea Categories (im_category).3. Open the record form of the idea created in step 1 and check the activity stream. Add some work notes and comments and observe that they are loaded correctly.4. Delete one record from the 'Idea Categories' table that is related to the idea created in step 1.5. Go back to the idea form, add a new work note or additional comment, and select Post.Expected BehaviorThe newly added work note is displayed on the Activity Stream.Actual BehaviorThe newly added work note is not added to the Activity Stream.On reloading the form, it shows Activities: 0.History of the record has also stopped working.WorkaroundCustomer can delete invalid entries from sys_collections using the following background script (run in global scope)://///////////////////////////////////////////////////////////////////var TARGET_TABLE = 'im_m2m_idea_category';var gr = new GlideRecord('sys_collection');gr.addQuery('collection', TARGET_TABLE);gr.query();var count = 0;while (gr.next()) {count++;gs.print('[DELETE] record from sys_collection table for table=' + gr.getValue('collection') + ', name=' + gr.getValue('name'));gr.deleteRecord();}gs.print('Deleted Matched sys_collection records for table=' + TARGET_TABLE + ': ' + count);/////////////////////////////////////////////////////////////////////Related Problem: PRB1981597