- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-27-2017 06:54 AM
Hello Community,
I'm doing some re-factoring on my email notifications and I've come across a scenario where I have 2 notifications on the same table(sc_task) for the same reason but with different recipients because the information is slightly different(1 or 2 lines difference). These 2 emails can use the same email script but there is 1 roadblock here. Is there a way for me to determine, in the email notification script, who the recipient of the notification is?
Ive tried using the email_action object but many of the properties inside are empty. Here is a small snippet of the properties i looked at...
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-27-2017 10:41 AM
Jim, great content and useful as expected. The method that you outlined in that post is a little more complicated than I need for my situation however, you brushed right over EXACTLY what I was looking for. Here...
The email_action object provides access to 3 properties to obtain the recipients of the email notification..
is accessed via email_action.getValue('recipient_fields') and correlates to this field on the email notification record
is accessed via email_action.getValue('recipient_groups') and correlates to this field on the email notification record
is accessed via email_action.getValue('recipient_users') and correlates to this field on the email notification record
That drawn out explanation was mainly for anyone else who finds this article but, I was not aware of I could access the properties of the email_action object that way because when logging it, those values are empty but when I use .getValue(), they actually return values. Anywho, that gives me what I need to continue my consolidation efforts. Thanks everyone for the assist here!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-27-2017 10:41 AM
Jim, great content and useful as expected. The method that you outlined in that post is a little more complicated than I need for my situation however, you brushed right over EXACTLY what I was looking for. Here...
The email_action object provides access to 3 properties to obtain the recipients of the email notification..
is accessed via email_action.getValue('recipient_fields') and correlates to this field on the email notification record
is accessed via email_action.getValue('recipient_groups') and correlates to this field on the email notification record
is accessed via email_action.getValue('recipient_users') and correlates to this field on the email notification record
That drawn out explanation was mainly for anyone else who finds this article but, I was not aware of I could access the properties of the email_action object that way because when logging it, those values are empty but when I use .getValue(), they actually return values. Anywho, that gives me what I need to continue my consolidation efforts. Thanks everyone for the assist here!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-27-2017 10:55 AM
OK, glad I got you pushed in the right direction.