The data type to represent a phone number. The field value can be assigned in several ways. Field of the Single type:

// Specify a phone  number without extension or type
Context.data.client_phone = Context.fields. client_phone.create('+19991234567'); 
// Specify a phone number  with an extension
Context.data.client_phone = Context.fields.client_phone. create('+19991234567', '123'); 
// Specify a phone number,  specifying the type and the extension 
Context.data.client_phone = { 
  type:  PhoneType.SomeType, 
  tel: '19991234567', 
  ext: '*100#' 
}; 

Field of the Multiple type:

// Specify a phone number with a type and  without an extension
Context.data.client_phone_list = Context.fields. client_phone_list.create('+19991234567', PhoneType.SomeType); 
//  Specify a phone number, specifying the type and the extension
Context.data.client_phone_list = Context.fields.client_phone_list.create( '19991234567', PhoneType.SomeType, '123'); 
// Specify several  phone numbers with their types and extensions
Context.data.client_phone_list = [ 
  { type: PhoneType.Home, tel: '+ 19991234567', ext: '123' }, 
  { type: PhoneType.Work, tel: '+19991234567',  ext: '*100#' }, 
  { type: PhoneType.Mobile, tel: '19991234567', ext: '#100# ' } 
]; 

Please note that in scripts, phone numbers are not validated.

Type parameters

Hierarchy

  • TPhone

Properties

Optional ext

ext: undefined | string

Telephone number extension.

tel

tel: string

Phone.

type

type: T

Phone type PhoneType.