format.getPhoneNumberFormatter(options)

Note:

The content in this help topic pertains to SuiteScript 2.x.

Method Description

Creates a format.PhoneNumberFormatter object to format phone numbers to strings.

Returns

Object

Supported Script Types

Client and server scripts

For more information, see SuiteScript 2.x Script Types.

Governance

10 units

Module

N/format/i18n Module

Methods and Properties

N/format/i18n Module Members

Since

2019.2

Parameters
Note:

The options parameter is a JavaScript object.

Parameter

Type

Required / Optional

Description

Since

options.formatType

enum

required

Phone number format type. Must be a value from format.PhoneNumberFormatType.

2020.2

Warning:

These parameters are mutually exclusive, you can always use only one of them.

Errors

Error Code

Thrown If

SSS_INVALID_FORMAT_TYPE

An invalid value is specified for the formatType option. Value must be a format.PhoneNumberFormatType value.

Related Topics

N/format/i18n Module
SuiteScript 2.x Modules
SuiteScript 2.x

General Notices