- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2020 01:18 PM
Help requested
How to remove (empty) user from sys_user_has role.list?
we recently cloned from prod to sub instance dev and in sys_user_has_role.list found empty(25) records.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2020 12:59 AM
without doing any changes in ACL the only option is , use background script to update it to false. eg:
var gr = new GlideRecord('sys_user_has_role');
gr.addEncodedQuery('user=22d0ed7fdb08b300798979e49f961977');
gr.query();
while(gr.next()){
gr.inherited=false;
gr.setWorkflow(false);
gr.update();
}
Now you will able to see the delete button on that record as well list , but on list name will be like "Remove user access from table"
Screenshot for reference.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2020 10:36 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2020 10:39 AM
make sure inherited set as false on those record . then this button will be visible.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2020 11:00 AM
thanks harshvardhan,
please can you guide to do inherited set as false. to do this role has to be elevated?
Best
Sri

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2020 12:59 AM
without doing any changes in ACL the only option is , use background script to update it to false. eg:
var gr = new GlideRecord('sys_user_has_role');
gr.addEncodedQuery('user=22d0ed7fdb08b300798979e49f961977');
gr.query();
while(gr.next()){
gr.inherited=false;
gr.setWorkflow(false);
gr.update();
}
Now you will able to see the delete button on that record as well list , but on list name will be like "Remove user access from table"
Screenshot for reference.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2020 10:33 AM
Thank you so much harshvardhan.