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 - sendSMS(String phoneNumber, String smsBody, GlideRecord source)

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
void

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

if (source.hasNext() && source.next()) {
    // 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);

This site is scheduled for a small content update on Monday, November 12th, between the hours of 4:00pm and 9:00pm Pacific Time (Nov 13 00:00 – 05:00 UTC). Acces to this site may be delayed during that time.