How to send single mail to manager for his multiple reports/employees?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-07-2023 02:23 AM - edited ‎04-07-2023 02:26 AM
Hi, so i have one task table and each task may have multiple assessments assigned to different user.
Now i had requirement to send notification on demand to managers of that assignees to inform them that one of their reports needs to complete assessment.
i have done this, but now for particular task if there are some assessments which are assigned to users who has same manager, then only one mail should be sent to manager for all his reports name in email body.
My script action to get users and their managers and use them notification and emails scripts-
I was not sure how to do this, please help me, thanks!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-07-2023 06:21 AM
Hi Akshay,
Trying to do that messaging by going through the individual tasks gets really messy really fast because you need to come up with a way to track what managers have already gotten a notice.
What might make things a lot easier is to create a GlideAggregate that will include any records that meet your criteria and then aggregate by manager including the COUNT of records. Once you have run that query you just have to go through a simple while /next loop to generate the notices to the managers.
Please let me know if you need help setting up the GlideAggregate.
:{)
Helpful and Correct tags are appreciated and help others to find information faster
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-07-2023 06:49 AM
@johnfeist Thanks for replying, will follow this way and see if it works