- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2022 02:08 AM
Hi
I want to hide records where a checkbox is set to true for all users unless they are member of the assigned assignment group
I want to do it with a business rule
Solved! Go to Solution.
- Labels:
-
Incident Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2022 05:58 AM - edited 02-10-2023 04:38 AM
Solved the problem by making a before query BR.
I simply made this script: current.addEncodedQuery("assignment_groupDYNAMICx^OR//FIELD//=false")
I did after doing a type of:
Apparently using ^NQ in encoded query in a before query BR causes a bug when opening up incidents
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2022 03:15 AM
I tried to follow the instructions from the second link you has provided.
My script is this:
if(gs.getUser().isMemberOf(current.assignment_group))
current.addEncodedQuery("u_flagged=true");
else
current.addEncodedQuery("u_flagged=false");.
However, when I test it and put u_flagged=true in an incident, it disappears from the list even though I am a member of the incident's assignment group
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2022 03:01 AM
@lars
You can also do with before query bussiness rule:
Something like below:
current.addEncodedQuery("u_boolean_1=true^assignment_groupDYNAMICd6435e965f510100a9ad2572f2b47744^NQu_boolean_1=false"); //replace with your checkbox backend name
Let me know if any queries
(=tested)
Thanks,
Murthy
Murthy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2022 03:12 AM
I actually just did exactly do this.
It seems however it produces a bug or a conflict of some sort in San Diego.
When that BR is active, every incident record I click on directs me to INC0000001 and sets all fields to read only.
Then, when I deactivate the BR and refresh the INC0000001 page, I am directed to the actual incident I clicked on in the first place.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2022 03:15 AM
Hi,
If you would like to do this with Business Rule then try the Before Query business rule.
A suggestion: For enhanced security on the platform it'll better to have ACls instead of query BR in the current scenario.
Thanks & Regards,
Dhruv
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2022 05:58 AM - edited 02-10-2023 04:38 AM
Solved the problem by making a before query BR.
I simply made this script: current.addEncodedQuery("assignment_groupDYNAMICx^OR//FIELD//=false")
I did after doing a type of:
Apparently using ^NQ in encoded query in a before query BR causes a bug when opening up incidents