Thank you for your feedback.
Form temporarily unavailable. Please try again or contact docfeedback@servicenow.com to submit your comments.
Versions
  • London
  • Kingston
  • Jakarta
  • Istanbul
  • Helsinki
  • Geneva
  • Store
Close

NotifyNow - getPreferredEmailAddress(GlideRecord user)

NotifyNow - getPreferredEmailAddress(GlideRecord user)

Returns a user's preferred email address

Table 1. Parameters
Name Type Description
user GlideRecord or String The user record or the sys_id of a user to get the email address from.
Table 2. Returns
Type Description
String The email address or null.

var userID = "some user sys id";
var email = new SNC.NotifyNow().getPreferredEmailAddress(userID);
gs.log('the preferred email address for sending email notifications is ' + email + ' for user with id: ' + userID);