- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-25-2015 02:07 PM
Hello all,
I was playing around on a dev instance and created a Many to Many Definition. However, when I try to delete the entry I created, everything is greyed out. I saw that you have to turn off Access Control (ACL) on the sys_m2m delete function. I go to do that, but I don't have access despite having the admin role. When I look at the script, it says:
gs.hasRole("nobody");
But I cannot assign the role "nobody" to myself. Is this some kind of joke? Why in the heck would m2m, by default, prevent everyone including the admins from deleting a entry they JUST CREATED? Seriously guys, how do I delete this entry? It's messing up my dev stuff.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-25-2015 05:06 PM
Hi Matthew,
Make sure you have provided your account with the Security Admin role as well and elevate your privileges before trying to modify the ACL.
This should resolve your issue and allow you to update the script to remove the check for the "nobody" role.
If this has been helpful, please mark my response as such. Also, if this has answered your question, please remember to mark my response as the correct answer.
Kind Regards,
Mike
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-25-2015 05:06 PM
Hi Matthew,
Make sure you have provided your account with the Security Admin role as well and elevate your privileges before trying to modify the ACL.
This should resolve your issue and allow you to update the script to remove the check for the "nobody" role.
If this has been helpful, please mark my response as such. Also, if this has answered your question, please remember to mark my response as the correct answer.
Kind Regards,
Mike
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-26-2015 07:13 AM
This was the correct solution. It allowed me to make all the changes I needed. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-25-2015 06:28 PM
Hi Matthew, often when you see an OOB gs.hasRole("nobody") in an ACL to do something that should be allowed is perhaps because there's a different way to do it. Although, i'm with you, one should be allowed to delete a m2m definition from the sys_m2m table directly.
Still, the good news is that you can delete the table that you created by navigating to System Definition >> Tables. From there, the ServiceNow platform will allow you to delete the m2m table with all the validations that it performs internally (such as references) prior eliminating a table.
Thanks,
Berny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-25-2015 06:37 PM
Hi Berny,
I have also gone this route and found that this does not delete the Many to Many definition record. This will still need to be deleted from the sys_m2m table.
Kind Regards,
Mike