How can I hide records on a table based on the user's group?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-15-2018 07:31 PM
I would like to hide certain records on the Requested Item (sc_req_item) table based on a user's group or role.
For example, if a user submits a "Request to Pull Email" Service Catalog request, a record on the sc_req_item will be created. I want these requests to be only visible to users in the groups "ITSS-MRS Security" and "ITSS-ECS E-Mail". I have created a beforeQuery Business Rule that runs on records with item = 'Request to Pull Email', but I am having trouble with the code in the advanced section of the business rule (the code should go something like this):
if (user.group == "ITSS-MRS Security" || user.group == "ITSS-ECS E-Mail" || user.role == "admin") {
visible = true
} else {
visible = false
}
How do I finish this code so that only those users can see the records?
Thanks in advance.