Read Access to specific users to HR Cases - Total Rewards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-09-2024 01:54 AM
Hello Friends,
Good Day!
We have one requirement where we needed some help.
We have created a record producer on Total Rewards table and also mapped with a HR Service, once users will submitted HR cases for total rewards we are also setting assignment group and short description for those cases so we can segregate.
But, our client wants that HR cases that are getting created should be visible to only users having a specific location and job code on user table.
We have written On Before Query business where we are checking if logged in user having this location or job then return encoded query where HR service = xyz. But, it’s not working as expected.
We have also tried to written Read ACL on HR core table and Total Rewards But we are not getting expected results.
Can anyone please help me on this like how we can achieve this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-11-2024 11:21 AM
Within the ACL record, set conditions that evaluate both the user's location and job code against the HR case record. Here's how you might set up the conditions:
- Type: Record
- Operation: Read
- Table: sn_hr_core_case
- Condition: location == gs.getUser().getLocation() && job_code == gs.getUser().getJobCode()
In this condition:
- location and job_code are fields on the HR case table.
- gs.getUser().getLocation() and gs.getUser().getJobCode() are fictitious methods representing how you might retrieve the location and job code for the current user. You would need to replace these with actual methods that retrieve this information from your user records.
- With this ACL in place, only users who have both the specified location and job code will be able to read HR cases.