- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-24-2024 08:46 AM
We have a requirement:
If Vendor Group in checked (see screenshot), the members of such group should only be able to see the tickets assigned to their group only.
What is the best way to address this requirement? ACL/Query Business Rule??
All help is greatly appreciated. Thanks.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-26-2024 06:36 PM
you can have it at task level but ensure it runs only for problem, change, incident
OR
create separate one on each of those tables
Thank you for marking my response as helpful.
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
12-30-2024 09:15 AM
Thank you for marking my solution as helpful! The community now supports multi-solution acceptance, allowing you to accept multiple answers.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-24-2024 11:30 PM
Hi @Zubair Alam ,
Display query business rule would be the right choice. you can do something like below.
if (gs.getUser().isMemberOf('Vendor Group')) { // Check if user is in any vendor group
var grGroup = new GlideRecord('sys_user_group');
grGroup.addQuery('u_vendor_group', true);
grGroup.query();
var groupIds = [];
while (grGroup.next()) {
groupIds.push(grGroup.getUniqueValue());
}
// Restrict query to tickets assigned to vendor's group
if (groupIds.length > 0) {
current.addQuery('assignment_group', 'IN', groupIds.join(','));
}
-------------------------------------------------------------------------
If you found my response helpful, please consider selecting "Accept as Solution" and marking it as "Helpful." This not only supports me but also benefits the community.
Regards
Runjay Patel - ServiceNow Solution Architect
YouTube: https://www.youtube.com/@RunjayP
LinkedIn: https://www.linkedin.com/in/runjay
-------------------------------------------------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-26-2024 11:11 AM
Thanks for the help @Runjay Patel .
Can this be applied to all the child tables of task (Incident, Problem, change, Request) separately to cover all types of tickets assigned to the group in question?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-26-2024 06:14 PM
Hi @Zubair Alam ,
you have to write separately for each table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-30-2024 09:15 AM
Thank you for marking my solution as helpful! The community now supports multi-solution acceptance, allowing you to accept multiple answers.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-25-2024 04:21 AM
Hi @Zubair Alam ,
ServiceNow suggests to use before query business rules to active this requirement. Refer below kb
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0790987
If my response helped, please mark it as the accepted solution ✅ and give a thumbs up👍.
Thanks,
Anand