ServiceNow List Field Type: Displaying Values in Email Notifications

Displaying List Field Type Values in Email Scripts

When trying to display values from a List field in an email script you can’t simply display the field name from the form.

Here’s my specific work example:

I created a List field type called “Sizes Needed” (u_sizes_needed) in a form used to submit a marketing request.

This List type field references a custom table that has a single custom field called size (see Figure 1).

Continue reading “ServiceNow List Field Type: Displaying Values in Email Notifications”

Using GlideRecord to get One Record

One of the coolest capabilities of ServiceNow is using Javascript to access database records. This is done using the GlideRecord() object. If you’re like Rick, you spent time searching how to use GlideRecord and when you found a solution, you copied and pasted it into your client script and moved onto the next challenge.

I discovered today that the problem with this technique is the first solution I found was not the optimal solution. Fortunately I happened across a TechNow Video that enlightened me on the best way.

In this case, I am trying to get a single user record from the sys_user table. Once I get the record I then use the person’s user_name from the user object to search for a record in a custom table. So here’s the inefficient way I was doing it (not efficient way in orange highlight):

var person = new GlideRecord(‘sys_user’);

Continue reading “Using GlideRecord to get One Record”