Skip to page contentSkip to chat
ServiceNow support
    • Community
      Ask questions, give advice, and connect with fellow ServiceNow professionals.
      Developer
      Build, test, and deploy applications
      Documentation
      Find detailed information about ServiceNow products, apps, features, and releases.
      Impact
      Accelerate ROI and amplify your expertise.
      Learning
      Build skills with instructor-led and online training.
      Partner
      Grow your business with promotions, news, and marketing tools
      ServiceNow
      Learn about ServiceNow products & solutions.
      Store
      Download certified apps and integrations that complement ServiceNow.
      Support
      Manage your instances, access self-help, and get technical support.
Email record message HTML preview and notification preview show difference in the content - Support and Troubleshooting
  • >
  • Knowledge Base
  • >
  • Support and Troubleshooting (Knowledge Base)
  • >
  • Email record message HTML preview and notification preview show difference in the content
KB0824338

Email record message HTML preview and notification preview show difference in the content


678 Views Last updated : Aug 2, 2023 public Copy Permalink
KB Summary by Now Assist

Issue

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

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,  use:

event.getDisplayValue("parm2")

This will pick the value from the event record.

 


The world works with ServiceNow.

Sign in for more! There's more content available only to authenticated users Sign in for more!
Did this KB article help you?
Did this KB article help you?

How would you rate your Now Support digital experience?

*

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

What can we improve? Please select all that apply.

What are we doing well? Please select all that apply.

Tell us more

*

Do you expect a response from this feedback?

  • Terms and conditions
  • Privacy statement
  • GDPR
  • Cookie policy
  • © 2025 ServiceNow. All rights reserved.