- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-12-2024 01:00 AM
Hello guys,
I have a problem here.
I created a Query Business rule on task table that is running only for users from group X. The condition that I build is:
- assignment group to be group X
OR
- business service to be Y
OR
- opened_by - user from the group X
In list view is working fine, it display what it should display.
The issue is when I try to open any record from that list (in this case incidents), it shows me other record from that list, but not the one that I clicked. It is the same for each record...I don't know where the issue is..
Could you help me?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-12-2024 05:53 AM
You will have to replace it with .addOrCondition().
You can chain multiple together.
Like this:
current.addQuery('your_field', your_value)
.addOrCondition('some_other_field', some_other_value)
.addOrCondition('another_field', another_value);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-12-2024 01:14 AM
did you check any table specific query BR is running?
why not handle it at specific table level such as incident, problem, change rather than task?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-12-2024 01:22 AM
Hello @Ankur Bawiskar ,
I created QBR for specific tables initially, like you suggested "incident", "ritm", "Req"...etc, but it creates extra business rules in the instance.
So, I moved the logic in task table where I can see all of these tables. In the list view, the users sees the records correctly, but when I open the record I see other record.
It seems that the error is caused by this KB0564887.
Can you advice?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-12-2024 02:59 AM
are you using that operator?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-12-2024 03:07 AM
Yes, I was using it.
Can you suggest how should I change the code to not include "^NQ", but still use the "OR" condition?