- 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 08:47 PM
you can use query business rule on your table
1) get the logged in user's group
2) then query groups table with Vendor group checkbox as true
3) store only those groups in an array and use that in encodedQuery
something like this
(function executeRule(current, previous /*null when async*/ ) {
// Add your code here
var arr = [];
var gr = new GlideRecord("sys_user_grmember");
gr.addQuery("user", gs.getUserID);
gr.addQuery("group.u_vendor_group", true);
gr.query();
while (gr.next()) {
arr.push(gr.getValue('group'));
}
current.addQuery('assignment_group.sys_id', arr.toString());
})(current, previous);
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-26-2024 11:08 AM
Thanks @Ankur Bawiskar . One question. Do we have to do this separately for all types of tickets (Incident, Problem, Change, Request) OR can we create this business rule to the task table to cover all ticket types?
Thanks for the help.
- 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:13 AM
@Ankur Bawiskar Thanks Ankur. Yes, your response provided me the detail that I pretty much needed. Thanks for all the help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-29-2024 09:38 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