system.twilio.getPhoneNumbersDataset
Description
Return a list of outgoing phone numbers for a Twilio account as a single-column Dataset. Note that these numbers are supplied by Twilio, and are not defined on a user in Ignition.
Syntax
system.twilio.getPhoneNumbersDataset (accountName )
-
Parameters
String accountName - The Twilio account to retrieve phone numbers for
-
Returns
Dataset - A list of phone numbers for the given Twilio account as a single-column Dataset
-
Scope
All
Code Examples
Code Snippet
#Retrieves a list of phone numbers associated with a twilio account and then passes the resulting list to a Table component's Data property.
#Checks against a Twilio Profile configured on the gateway by the name of "Twilio Account"
#Call system.twilio.getPhoneNumbers() and store the returned list into a variable
twilioNumbers
=
system.twilio.getPhoneNumbersDataset(
"Twilio Account"
)
#Pass the dataset to a Table component. The Table is located in the same container as the
#component calling this script
event.source.parent.getComponent(
'Table'
).data
=
twilioNumbers