how to remove duplicated OOB role
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2025 06:40 PM
I have a OOB role in the dev environment, but it was by mistake duplicated(insert and stay). now it was making lot of confusion.
i try to delete that role but it not happen .
can someone suggested me how to remove that duplicate role in dev environment.
thanks in advance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2025 06:44 PM
Hi @VSN,
Is there any error message you are getting?
Could you try deleting in Scripts - Background:
var current = new GlideRecord("sys_user_role");
if (current.get("SYS_ID")){ //Replace with your role sys_ID
current.deleteRecord();
}
If you found this helpful, please hit the thumbs-up button and mark as correct. That helps others find their solutions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2025 07:07 PM
Hi @VSN
Can you share the error message you get when you are trying to delete it.
Please make sure you are in proper application scope as the role is in and try deleting it.
I was able to delete OOB role in my PDI Instance without any issue. However, it dint allow me to create duplicate record as the name field is unique.
Regards
Saranesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2025 07:16 PM
after clicking the delete button it giving me result as - the page you are looking for could not be found.
and still i can see that role was existed in the system.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2025 07:38 PM
Hi @VSN,
Have you tried the script I shared?
If you found this helpful, please hit the thumbs-up button and mark as correct. That helps others find their solutions.