Notifications

14 views

Description

Email record message HTML preview and notification preview shows difference in the content.

Use case: Try to push the first_name from the event parm in the message notification body using mail script. When event is triggered, email notification is sent. However, when you check the message HTML preview, it does not show the first_name. But when you check the notification preview from the triggered notification by selecting "Existing Event" and choosing the triggered event, it shows the first_name.

Mail Script:

var jsonStr = current.getDisplayValue("parm2");
var userobj = JSON.parse(jsonStr);
template.print(userobj.first_name);

Release or Environment

All

Cause

current.getDisplayValue("parm2") will show the name from the current object so it will not show the event parm values. This is the reason it is showing the first_name in the notification preview.

Resolution

To get the event parm2 value to display the first_name in the email, you need use:

 

event.getDisplayValue("parm2")

 

This will pick the value from the event record.

 

Article Information

Last Updated:2020-05-10 20:48:51
Published:2020-05-11