NotifyAction - addSMS()

Send an SMS message.

When using this function with an active call, you do not need to call the setTo function on the returned SMSAction object. The SMS is automatically sent to the caller.

Table 1. Parameters
Name Type Description
Table 2. Returns
Type Description
SMSAction The action added to the NotifyAction object. Use the SMSAction object to define the message text and the phone number to send the message to.

// instantiate NotifyAction
var notifyAction = new SNC.NotifyAction();

// define where to send the sms to
var number = new GlideElementPhoneNumber();
number.setPhoneNumber('+31612345678', true);

// add a SMS action
var sms = notifyAction.addSMS();
sms.setMessage('Lorem ipsum dolor sit amet, consectetur adipiscing elit.');