NotifyNow - getPreferredEmailAddress(GlideRecord user)
Returns a user's preferred email address
| Name | Type | Description |
|---|---|---|
| user | GlideRecord or String | The user record or the sys_id of a user to get the email address from. |
| 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);