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

Notify - getPhoneNumbers()

Notify - getPhoneNumbers()

Get all phone numbers and short codes available to Notify, as an array.

Table 1. Parameters
Name Type Description
None
Table 2. Returns
Type Description
Array An array of NotifyPhoneNumber objects, each object representing one phone number available to Notify.

// instantiate notify
var notify = new SNC.Notify();

// get all available phone numbers
var phoneNumbers = notify.getPhoneNumbers();

// iterate over phone numbers
for (var i = 0; i < phoneNumbers.size(); i++) {

var number = phoneNumbers.get(i);

//perform any actions using each phone number

}