logo

NJP

Identifying a problematic quick message in the Email client

Import · Nov 12, 2015 · article

At the top bar of the form, the email icon will open a convenient tool that allows you to enjoy the flexibility of a quick email and the ability to use templates. These templates are called quick messages and can cause problems on the email client itself.

The ServiceNow email client enables you to send email directly from any record (such as an incident, change request, problem, or user record). After you enable the email client for an application, users can see an email icon in the header bar for each application record. All you need to do is click the email icon to launch the email client as a pop-up window.

image

If the window does not appear, verify that your browser is not blocking pop-ups or the quick messages content.

Using the email client quick messages

Can Emails or quick messages allow you to insert predefined text into the message body of the email client. Selecting a quick message fills the Message Text field with the body specified in the quick message.

The idea is simple. To define quick messages go to System Policy > Quick Messages. Those messages will be shown at the top of the email client. After you define one or more quick messages, the Quick Message selector appears in the email client. You can reference variables directly in quick messages. Use the following syntax: ${variable_name}.

How to identify a problematic quick message

If the email client fails to load for a particular user, please validate the Canned messages for the user (Quick messages).

Usual errors on canned messages are:

  • Mail scripts
  • Very long text
  • Complex encoded text inside
  • Attachments
  • String fields that contain unencoded HTML special entities like less than "<" or more than ">".

The email client does not support mail scripts. For scripts on the email client, use the email client template instead.

If a String field (e.g. short_description) is used inside the quick messages (e.g. as ${short_description}), it should contain a valid HTML text with HTML entiries fully encoded.

e.g To display

Text <>

the String field (e.g short_description) value needs to contain:

Text <<this "case" is 'simple' Düsseldorf >>

Using HTML encoded characters, ensure the browser will display the correct message.

If you use the less than (<) or greater than (>) signs in the String field inserted in the template, the browser might mix them with tags, becoming invisible but still present.

Here is an example that shows an error inside the new canned message called "error-canned-message" with body.

test of a problematic canned message

${mailscript:problematic_error}

Example of quick messages not supporting mailscript:

image

If you add problematic text inside the quick message, the email client fails to load and only "Compose Email" is shown at the top.

Another symptom could be that the quick messages do not seem to apply on the body.

Example of Compose Email not loading:

image

Our email client is sensitive to errors from the "Quick messages." To resolve those problems review the text on the relevant quick messages or the values used on the ${variable} inside the quick messages are valid HTML characters.

I've tested these example on Fuji, user Chrome as my browser.

I particularly like quick messages in the email client because it reminds me of Facebook messages. How do you use quick messages?

More information is available here:

View original source

https://www.servicenow.com/community/developer-blog/identifying-a-problematic-quick-message-in-the-email-client/ba-p/2271463