- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-23-2017 11:11 AM
Hi Team,
I have an issue with deleting orphan records from sys_user_has_role table.
Tried with fix script to delete these records using GlideRecord, failed.
Delete button is disabled, even though schema level deletion is enable.
Also dried to deleted the user and imported the same user record using XML (user record export). Still role definitions are there!
Is there any method to delete these records from the above table?
Any suggestion please?
Platform is on Helsinki Patch 8.
Thanks & Regards,
Gee Abraham
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-27-2017 06:47 AM
Hi All,
This issue has been resolved by installing the following plugin.
Contextual Security: Role Management Enhancements (com.glide.role_management.inh_count)
Many thanks for your efforts to resolve this issue.
Best Regards,
Gee
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-24-2017 05:30 AM
Hi Rajshekhar,
We have user_name (User ID) and email id values are the same.
I am getting the correct user record and it contains 8 orphan roles. Query and scripts are OK, but not deleting it from the sys_user_has_role table.
Strange issue, unable to understand the reason!
Thanks,
Gee
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-24-2017 06:04 AM
Hi Gee,
I have understood the issue, whereas I am facing the similar situation for only one user in my personal Dev instance.
But when I checked roles of the user in the Roles related list from the user record, I found there were no roles showing in the Available slush bucket of the roles.
e.g.
But for other users, the script is working fine for me.
Could you please check the issue, because I am not getting the reason here at this go...
Regards,
Rajshekhar Paul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-24-2017 06:19 AM
Hi Rajshekhar,
Yes, same issue. Roles are listed on the related list, but on the edit/slush-bucket none of the role listed (empty).
Thanks & Regards,
Gee
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-24-2017 06:23 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-24-2017 06:52 AM
Hi Gee,
This script is working fine for deletion of roles from the users. But the User's those are associated with any groups having roles, will not get deleted from there.
For those you may need to find some alternative way out. But one thing to say, what I understood from the subject line of your query is, you wanted to delete the orphan records from the sys_user_has_role table. So, my scripts serves that purpose completely, and the rest of the roles that are remaining is not orphaned but are actually getting inherited from groups the user is associated.
I hope this will help and clarify you.
Please hit like or helpful based on impact.
Thanks,
Rajshekhar Paul