- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2017 09:35 AM
Guys,
I see that "accumulated_roles" field on the user table which has read & write field ACLs for "maint" role only but don't see any purpose of it exposed anywhere in the system.
Questions:
=========
1) Can any one tell me why it has been created in the system and hidden even for admin ?
2) Can I use this field to populate the user roles (which are assigned to the user through Roles related list) for reporting purpose ?
The reason why I am asking is, I have to generate a report against the User table which has to include the user roles as well but the roles are adding to the User Role table (related list) rather than the Roles field (Glide List) which is on the User form.
Solved! Go to Solution.
- Labels:
-
Analytics and Reports

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2017 05:35 AM
Upon further testing, you are correct. The roles field is not auto-maintained by adding/removing groups in the related list. Similarly, the related list is not auto-maintained by adding/removing fields from the roles list field. I was under the impression that it was.
It wouldn't take much to write a business rule on sys_user_has_role table to keep the roles field updated and then make your report fairly simple as you originally requested.
Any time a record is added or deleted, you know the user, so update the record's field with which ever roles you find for that user in the table (accounting for uniqueness.) Don't forget, list fields are comma separated sys_ids so you'll need the sys_id of the role, which is easy enough since sys_user_has_role.role is a reference field and not a string.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2017 09:43 AM
Hi Vijay,
Good question. I took a look at it and it appears to be something used internally. For what, I don't know. An example of the data in the table is a comma separated list of roles with START and END at the front and end of the list. I suspect this is maintained and used as a quicker lookup than hitting the sys_user_has_role table every time.
Example sample data:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2017 09:47 AM
Hi Tomasi,
From your screen shot, Are these roles added through related list or roles field (type is glide list) on the form ?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2017 09:56 AM
Hi Vijay,
Always manage roles through the related list (either directly or inherited from a group membership with that role.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2017 09:58 AM
Hi Chuck,
Thanks for your update. I also have the same question, so I'm clearing my concept on the same a bit. I have couple of questions on the same:
1. Could you please tell us any real time scenario where we can use that accumulated_roles for a better and faster lookup?
2. By default 'maint' has the read and write access on the field. So for us,i.e., admin users, what is the purpose of the field? We can modify the ACLs, but is it recommended?
3. From this thread Adding roles in bulk , I had an idea that the field is of no use. If possible, could you please provide any ray of light on the same?