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 numberwithoutextensionor type
Context.data.client_phone = Context.fields. client_phone.create('+19991234567');
// Specify a phone numberwithanextension
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 numberwitha type andwithoutanextension
Context.data.client_phone_list = Context.fields. client_phone_list.create('+19991234567', PhoneType.SomeType);
// Specify a phone number, specifying the type andtheextension
Context.data.client_phone_list = Context.fields.client_phone_list.create( '19991234567', PhoneType.SomeType, '123');
Phone
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.