Help! M2M Relationship Removal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-12-2013 02:02 PM
I've been looking and I can't find any information on how to remove a Many to Many relationship table as created by the sys_m2m table.
I created M2M relationships from a table to Change Request then realized I could have used Task which would allow me to use it for Change, Incident, etc. so i created my relationship to Task, but now I need to remove the old one, it won't let me delete the relationship.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-13-2013 06:41 AM
I thought I could just disable the ACL which restricts deletion, I just wanted someone to verify that I wouldn't be leaving pieces behind, after more research today I found this :
http://www.servicenowguru.com/system-definition/relationships/creating-manytomany-relationship-servicenowcom/
Mark Stanger 10-01-2011, 01:03 :
.... The only way to delete the m2m entry is to disable the security ACL on the 'sys_m2m' table first....
Thanks again SNC Guru!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-14-2013 02:23 AM
I have been looking for this solution for a long time thanks 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-14-2013 07:31 AM
I hoped it might help someone.
I don't know if it's recommended, but because only a very few of us have the access I changed the ACL to allow 'security_admin' to delete.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-14-2019 03:28 PM
Way late but I just had this issue and thought i'd post my fix.. I was trying to remove an m2m relationship for a table that I had deleted and like you couldn't find a 'delete' option.
I exported the XML and changed the <sys_m2m action="INSERT_OR_UPDATE"> to <sys_m2m action="DELETE"> then used the "import xml" from any list view and it seems to have done the trick.
Steps:
1) delete the m2m table itself
2) export the XML of the m2m relationship definition
3) edit the sys_m2m action to state DELETE
4) use the import XML option
5) Validate removal.