Query Business rule based on assignment group
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-12-2020 05:17 AM
Hi Team,
I am writing the query Business rule. Where if Logged in user is member of that group, then only incidents belongs to that assignment group should be visible.
Before query business rule on Incident.
it works when I send Sys_id of that group example:
if(gs.getUser().isMemberOf('f795ab34db230010bdfd0181ca96196b'))
{
current.addQuery('assignment_group','f795ab34db230010bdfd0181ca96196b');
}
Its Not working below one.
if(gs.getUser().isMemberOf(current.assignment_group))
{
current.addQuery('assignment_group',current.assignment_group);
}
- Labels:
-
Incident Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-01-2021 03:20 PM
Adrian Script will work after making one modification:
if (gs.getUser().isMemberOf(gs.getProperty('property_name'))) {
current.addQuery('assignment_group', gs.getProperty('property_name'));
}
If it was helpful, Please mark it helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-14-2020 12:35 PM
Hi Pooja,
You have to pass Sys_ID if you are using before query BR. As it runs when any user queries any table. So cunnent.assignment group will not work.
Regards
Harshal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-25-2024 09:38 AM
Before Query business rule: