Set the opened for line manager to watchlist in HRSD
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-08-2024 11:28 PM - edited 07-08-2024 11:41 PM
Hello Everyone,
I want to set the opened for line manager to the watchlist after the HR case is submitted but only for specific location of opened for.
Eg: If opened for location is Germany then only I need the line manager to be set in the watchlist..
Opened for is linked to HR profile
Can anyone help?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-08-2024 11:54 PM
Hi @Supriya KM, there is an OOTB business rule called "Add HR supervisors to watch list" which is used to add specific group members to the watchlist of an HR case (for a VIP case). You can use this as a starting point and change the "When to run" rules to match your conditions and change the script to add the line manager.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2024 12:02 AM
Hello @David Aldridge
Thanks for the reply.
But my requirement is with the normal HR cases with the users not for VIP users.
If any help on requested above is appreciated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2024 12:27 AM
@Supriya KM I was just suggesting that you can use this Business Rule as an example to follow. Create your own business rule and set the "When to run" condition builder to your requirements. You'll also need to edit the script action, but you can re-use the elements that add users to the watch list.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2024 12:41 AM
@Supriya KM Please create a business rule as follows on sn_hr_core_case table.
Here I am assuming that location field on the user record has country field filled as Germany.
Here is the script
(function executeRule(current, previous /*null when async*/ ) {
// Add your code here
var watchlist = current.watch_list = '';
if (watchlist) {
current.watch_list = watchlist + ',' + current.opened_for;
} else {
current.watch_list = current.opened_for + '';
}
})(current, previous);
Please mark the response helpful and correct if it manages to address your issue.