Security attributes doesn't work
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-01-2024 07:52 AM
Hi all,
I am trying to create some customized Security Attributes with Data filtration, but it doesn't work.
My objective is simple: Give access to Incidents assigned to the group "Network" only for user with the department "Sales".
Then I have created the following Security attribute:
*I also have tried using string type.
I also have created the following Data Filtration:
But it doesn't work.
with that gs.log I can see that the script is executed, but the data filtration cannot deal with the security attribute.
Does anyone know what could be wrong?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2025 09:25 AM
I've tried something similar with a custom Security Attribute for department and it's also not working. Did you every figure this out?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2025 07:59 AM
A Query business rule can do what is asked. That runs Before for the incident table.
Script:
// Give access to Incidents assigned to the group "Network" only for user
// with the department "Sales".
var usr = gs.getUserID().toString();
var suser = new GlideRecord('sys_user');
suser.addQuery('sys_id', usr);
suser.query();
if (suser.next() && suser.department == '221db0edc611228401760aec06c9d929') {
// gs.info('BR: user: ' + usr + ', dept: ' + suser.department);
current.addQuery('assignment_group', '8a5055c9c61122780043563ef53438e3');
}