How to add manager dynamically in cc by using mail script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2022 06:02 AM
Hello,
Can anyone help me with this query?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2022 06:18 AM - edited 11-17-2022 06:19 AM
email.addAddress('cc',current.YourUserFieldHere.manager.email);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2022 07:00 AM
Hello,
I have added this here in the code below, but it is not working. Actually I'm passing list of incidents to the assignee, but condition is assignee's manager should be in cc.
Can you please help me here?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2022 07:04 AM - edited 11-17-2022 07:11 AM
That looks fine. Is the rest of your code working, is the list of Incidents being printed (just wondering if there a different error)? Also, make sure there is a person assigned to the incident, that person has a manager tied to their profile, and that manager's email address is filled in.
You can also try hardcoding an email address, for troubleshooting purposes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2022 07:23 AM
Yes, list of incidents is printed. Everything is working fine but manager is not reflecting in cc. Not sure about the log message below shows undefined..