URGENT: Query Business Rule
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2024 01:14 AM
Hi Community,
I need your assistance in achieving the below requirement without causing any issues with the existing functionality.
When the user submits "Apple iPad" request, it should only visible to him/her and to a specific group where they can work on this request.
Currently all ITIL and other users are able to access these items without any restriction.
I can't utilize ACL's due to that fact that the other existing functionality may not work as there are nearly 7K+ items and they follow their own security.
When writing a query BR, I am able to control the visibility to only specific group but the requested for user is not able to see his own request for the "Apple iPad" item.
Thank you
LakshmiK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2024 02:03 AM
Hi @LakshmiK ,
Can you share your code?
Did you add a condition to check if "requested for" is currently logged in user or not.
If not try the below code -
var loggedUser= gs.getUserID();
current.addQuery("requested_for", loggedUser).addOrCondtion("Your group condition");
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2024 02:05 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2024 02:06 AM
Hi @LakshmiK ,
can you share your code which you have tried till now?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2024 02:16 AM
1 Version:
var currentUser = gs.getUserID();
current.addQuery("opened_by",'!=', 'currentUser') .addorCondition("requested_for",'!=', 'currentUser').addorCondition (!gs.getUser().isMemberOf('R799684440730021098b3f61d7c1ed047IT') {
2. Version: