Trigger emails to the group members alone from a scheduled job
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-12-2025 11:47 PM
Hi,
I am passing the sys_id of the group as Event parm1, using gs.eventQueue from a scheduled job.
The event is getting triggered and the notifications are sent to the group members and also to the group manager.
How can I stop sending emails to group manager, the email has to be sent to the group members alone.
Thanks!
Ram
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-12-2025 11:55 PM
The group manager in a way is also the group member so if you want to exclude the manager you will need to query the group members and send the notifications to them like how you send the notifications to users.
Please mark the answer helpful and correct if it helps the issue. Happy scripting 🙂
-Shantanu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2025 12:01 AM
@shantanu_patel8 , I am doing the same through a Business Rule to trigger the event but there the email is being sent only to the group members not to the manager of the group.
But in scheduled job, it includes the manager of the group.
Thanks!
Ram
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2025 12:07 AM
It could be because of the "run as" field in scheduled job vs the user through which the business rule is getting triggered. The user in business rule might not have the access to manager field or profile hence the mail is not being sent to manager.
You will need to debug the user through which you are triggering the event.
Please mark the answer helpful and correct if it helps the issue. Happy scripting 🙂
-Shantanu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2025 12:26 AM
Hello @Ramkumar Thanga
You need to check the exclude manager field in Group Form. By doing this the manager will not get the mail sent to the group.
Kindly mark my answer as helpful and accept solution if it helped you.
Thanks,
Shubhra Saxena