- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2025 01:30 AM
Hi All,
I have a scenario where if logged in user is a part of wpt and opens new incident form can only see groups related to wpt. Also, if it is not a new form and incident is assigned to wpt then along with wpt groups , group A should also come in the assignment group so that they can re assign the tkt to group A, if required. I have written script include and client script, added logs as well, script include is passing groups correctly to client script but in assignment group field all the groups are visible. Below are the scripts:
Client Script:
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2025 03:21 AM
Hi All,
Thanks for your efforts and time. I managed to resolve this issue by sending the incident number from reference qualifier and in script include i gliderecord the incident table to check if record with this number exists or not. it it does not exist, it is a newReord and accordingly i run the entire script.
Regards,
Shivani.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2025 04:05 AM
then you can use current.sys_created_by
this field will be empty when new record is there
I tested this
javascript: new assignment_group().getVisibleGroups(current.sys_created_by);
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2025 08:21 PM
Hope you are doing good.
Did my reply answer your question?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2025 07:48 PM
Hope you are doing good.
Did my reply answer your question?
If my response helped please mark it correct as well so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2025 03:21 AM
Hi All,
Thanks for your efforts and time. I managed to resolve this issue by sending the incident number from reference qualifier and in script include i gliderecord the incident table to check if record with this number exists or not. it it does not exist, it is a newReord and accordingly i run the entire script.
Regards,
Shivani.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2025 03:24 AM - edited 01-09-2025 03:28 AM
Even my approach should work.
As per new community feature you can mark multiple responses as correct.
If my response helped please mark it correct as well so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader