NotifyNow - sendEmailQuestion(String emailAddress, String question, GlideRecord sourceRecord, String emailSubject)

Send an email question to an email address.

The sendEmailQuestion method produces a question body and requires users to click a link to indicate their choice.

Table 1. Parameters
Name Type Description
emailAddress String Email address to send the question to.
question String or GlideRecord The question record to send or the sys_id of a question record.
sourceRecord GlideRecord An optional source record to associate to the SMS question, such as an incident.
emailSubject String Optional text to override the default email subject.
Table 2. Returns
Type Description
String The conversation sys_id.

This example demonstrates using the default email subject.

var user = GlideRecord("sys_user");
user.get("email", "");
new SNC.NotifyNow().sendEmailQuestion(user.getValue('email'), "b6b34500bf3111003cf585ce2c0739ce", user);

This example uses dot-walking and specifies a source record and email subject.

new SNC.NotifyNow().sendEmailQuestion("", "b6071733bf1111003cf585ce2c07390f", current, 
        "Please answer this question");

This example uses dot-walking and specifies an email subject but no source record.

new SNC.NotifyNow().sendEmailQuestion("", "b6071733bf1111003cf585ce2c07390f", 
        "Please answer this question");