- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2023 11:15 PM
I Have to prepare something like this:
If User is not member of 'group' - then he can Choose only 1 group, of course if he decide about to change assignment group. I'm working on Problem Table.
Here is example what is not working right now 😕
if (!gs.getUser().isMemberOf('6ae3f5b21b479850bf327bb5464bcb45') && gs.getSession().isInteractive()) {
current.addQuery('assignment_group', '6ae3f5b21b479850bf327bb5464bcb45');
I thought that 'isInteractive()' will help but I was wrong..
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-28-2023 12:55 AM - edited 09-28-2023 01:00 AM
Hello @DIVI1 ,
Please find the below code, Goto Dictionary entry of Assignment group in problem form, and enter below code in Dictionary override -> Override Reference qualifier (check box)
javascript: if(!gs.getUser().isMemberOf('0c4e7b573b331300ad3cc9bb34efc461')) { "name=Problem Analyzers^EQ" } else { "name!=Problem Analyzers^EQ" } // Here I used Problem Analyzer Group for my convenient, you can replace your Problem Coordinator sys_id and name at respected places.
Please mark my answer correct & helpful, if it helps you
Thank you
Thank you
G Ramana Murthy
ServiceNow Developer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2023 11:21 PM
where are you writing this script?
Can you explain complete business requirement?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2023 11:28 PM
@Ankur
That's the point, cause I'm not sure right now what should it be client script or BR, That part of the script I just prepared in Business Rule.
Business expect, the possibility to change assignment group to another should be avalaible only for users which are a part of group 'Problem Coordinators', If user is not a part of this group the only group which he can choose is 'Problem Coordinators'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2023 11:50 PM
Hello @DIVI1 ,
You can try this with Dynamic Reference Qualifier for the Assignment Group field, You can write a script include, and call it from Dynamic Filter.
Please mark my answer correct & helpful, if it helps you
Thank you
Thank you
G Ramana Murthy
ServiceNow Developer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2023 11:55 PM
Ok, I'm not sure how the Script part should look like.