NotifyNow - sendSMS(String phoneNumber, String smsBody, GlideRecord source)

Send an SMS message to an E.164-compliant mobile phone number.

Notify supports international numbers. Using this method with a number that does not support sending SMS messages results in an error being logged.

Table 1. Parameters
Name Type Description
phoneNumber String The E.164-compliant phone number to send the message to.
smsBody String The message to send, maximum 1600 characters.
source GlideRecord The source record to associate with this SMS message.
Table 2. Returns
Type Description

var source = new GlideRecord("my_table");
source.query("my_field", "my_value");

if (source.hasNext() && {
    // send a text message
    var nn = new SNC.NotifyNow();
    var message = "this is just a test";
    var number = "+31612345678";
    nn.sendSMS(number, message, source);

This example uses dot-walking and the current record as the source record.

new SNC.NotifyNow().sendSMS("+31612345678", "this is a test", current);