Data type for representing a phone number.
The value of the field can be set in several ways.
Single-type field:
// Set the phone numberwithoutanextensionand type.
Context.data.client_phone = Context.fields. client_phone.create('+40091234567');
// Set the phone numberwithanextension.
Context.data.client_phone = Context.fields.client_phone. create('+40091234567', '123');
// Set the phone number with type and extension. Context.data.client_phone = {
type: PhoneType.SomeType,
tel: '40091234567',
ext: '*100#'
};
Field with subtype Multiple:
// Set the phone number and type without an extension. Context.data.client_phone_list = Context.fields.client_phone_list.create('+ 40091234567', PhoneType.SomeType);
// Set the phone number, type, and extension. Context.data.client_phone_list = Context.fields. client_phone_list.create('89991234567', PhoneType.SomeType, '123');
Phone
Data type for representing a phone number. The value of the field can be set in several ways. Single-type field:
// Set the phone number without an extension and type. Context.data.client_phone = Context.fields. client_phone.create('+40091234567');
// Set the phone number with an extension. Context.data.client_phone = Context.fields.client_phone. create('+40091234567', '123');
// Set the phone number with type and extension. Context.data.client_phone = { type: PhoneType.SomeType, tel: '40091234567', ext: '*100#' };
Field with subtype Multiple:
// Set the phone number and type without an extension. Context.data.client_phone_list = Context.fields.client_phone_list.create('+ 40091234567', PhoneType.SomeType);
// Set the phone number, type, and extension. Context.data.client_phone_list = Context.fields. client_phone_list.create('89991234567', PhoneType.SomeType, '123');
// Set multiple phone numbers with types and extensions. Context.data.client_phone_list = [ { type: PhoneType.Home, tel: '+ 40091234567', ext: '123' }, { type: PhoneType.Work, tel: '+40091234567', ext: '*100#' }, { type: PhoneType.Mobile, tel: '40091234567', ext: '#100# ' } ];
Note: When working with scripts, no validation of phone number format is performed.