- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-13-2020 01:11 PM
Hello All,
I created a Before-Query business rule to restrict the HR case visibility based on the group membership. If you are a member of group "xyz" then you should see only the HR cases assigned to group "xyz". This is working as expected. However, when a member creates a new HR case with their group as the assignment group and saves the record, they are getting a message "Info Message You do not have permission to read the created record" even though the created record is for their group. When they search the record they can read the data as they have access to read as per the business rule. I am not sure why I am getting that information message as soon as I save the case? Any help is much appreciated. Thank you.
Regards,
Mnreddy.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-16-2020 06:13 AM
Hi,
on which table you are checking this
OOB there is 1 query BR on HR Case table
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-15-2020 08:42 PM
the issue is toArray() won't work in scoped application i.e. HR Core scope
so use this
(function executeRule(current, previous /*null when async*/) {
var groups = new global.ArrayUtil().convertArray(gs.getUser().getMyGroups());
current.addQuery("assignment_group", "IN", groups);
})(current, previous);
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-16-2020 05:36 AM
Thanks for your response
Regards,
Mnreddy.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-16-2020 06:13 AM
Hi,
on which table you are checking this
OOB there is 1 query BR on HR Case table
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-16-2020 08:49 AM
Thank you
Regards,
Mnreddy.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-16-2020 09:00 AM
You are welcome.
Happy weekend.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader