'Record History' tab visibility on the HR Agent Workspace

AakankshaSK
Tera Contributor

Hi Community, 

We have a business requirement to show the 'Record History' tab to every user having sn_hr_core.basic role assigned to them. We tried by creating a Read ACL on the sys_history_set table and assigning the role to it but unfortunately, it did not work.

We also verified in the UI Builder to see any visibility role condition assigned to it or not, but that too was empty.

Does anyone have any idea how we can achieve this? Since many posts suggest that it is OOB behavior that only admins can see the 'Record History' section.

AakankshaSK_0-1789560604408.png

 

4 REPLIES 4

rahulswami
Tera Contributor

Hi @AakankshaSK,

You actually ruled out the right things, which narrows this down.

There is a separate mechanism worth knowing about first - UI Builder components have their own "Edit component visibility" option, the eye icon in the component config panel, where you can attach a scripted hide condition using api.context.session.user.roles, something like checking roles.indexOf('admin') and returning true or false. That's the standard way to gate a component by role at the UI Builder layer. Since you found nothing set there, that confirms the block is not happening at that layer either, so it's not a simple missing visibility script you can just add.

That leaves the data layer. The Record History tab on the Standard Record Page pulls its rows through its own data resource, not a plain related list bound to sys_history_set, which is exactly why an ACL on that table had no effect, the component isn't asking the ACL engine that question at all. The role check (admin, sn_hr_core.admin, sn_hr_core.manager) is happening inside whatever script or scripted REST resource backs that data resource, before your ACL layer ever gets consulted.

There's also a known platform issue that matches your symptoms closely, non-admin users get an empty Record History list in Workspace, and the sys_id passed into the filter comes back empty for them specifically. That points to the context (the record's sys_id) not being propagated correctly into the data resource for non-privileged sessions, which is a defect-shaped problem, not just a config gap.

Given that, two real paths forward. Either open the Record History component's data resource definition in UI Builder and check exactly what role check or script include it's calling, then extend that logic to include sn_hr_core.basic if it's editable. Or, since this lines up with a known issue, log it with ServiceNow support referencing the empty sys_id in filter symptom specifically, it's possible this needs a platform fix rather than a workaround on your end.

Dinesh Chilaka
Mega Sage

@AakankshaSK ,

Did you got any solution for this?

 

Thanks,

Dinesh

 

Unfortunately, no. There is no OOB solution for this. We tried by creating some ACLs but then again, it worked for some users and for others it did not, so we dropped the requirement altogether now. 

sanjaygupta
Tera Guru

Hi, an ACL on sys_history_set alone is usually not enough. The History List documentation lists three requirements, and the third one is easy to miss.

The three requirements are:

  • Auditing must be enabled on the table.
  • A read ACL must exist on the Record History [sys_history_set] table for non-admins.
  • At least one of the user’s roles must be listed in the glide.history.role system property, which includes itil by default.

Since sn_hr_core.basic is not in that property by default, I’d start there.

  • Go to sys_properties.list and open glide.history.role.
  • Add sn_hr_core.basic to the comma-separated value and save. If the property doesn’t exist, create it as a string property with that value.
  • Go to System Definition > Tables, open HR Case [sn_hr_core_case], and confirm Audit is checked.
  • Keep your read ACL on sys_history_set for sn_hr_core.basic.
  • Add a read ACL on sys_history_line for the same role, since that table holds the rows the tab displays.
  • Ask a test user with only sn_hr_core.basic to log out and back in, then check the tab in the workspace.

A community thread reports that with only the set ACL, users saw the tab but no lines. They then needed the sys_history_line ACL too. If lines are still empty after that, a data condition on the ACL may be filtering them out, so try it without one first in a test instance.

Record history can contain sensitive HR details, so limit the ACLs to the HR Case tables where possible, and test in a sub-production instance before production. I couldn’t find a documented role condition on the tab itself in Workspace, so this combination of property and ACLs is the safest supported route.

Hope you found it helpful.

Sources: