Loading

Standard 'Phone' field length and formatting

Julkaisupäivä: Oct 3, 2024
Kuvaus


When you enter phone numbers in standard Phone fields, Salesforce preserves whichever phone number format you enter.

Phone fields can accept a maximum of 40 digits in length entered via the Salesforce UI (that can not be done via the API).

For full guidelines, please review the Formats for Currency, Dates, Times, Names, and Phone Numbers documentation.

 

Note:

 

Ratkaisu

Salesforce has special logic formatting for the phone field.  There are some exceptions to the automatic formatting when the User Locale is English (US) or English (Canada).

Exceptions: Phone field automatic formatting based on User Locale

If your User Locale is set to "English (United States)" or "English (Canada)," Salesforce 10-digit and 11-digit phone numbers starting with "1" are formatted as described below with 9 digits having no formatting.
 

Phone numbers containing 9 digits
 

  • Data will be saved as is without any formatting (Ex: 123456789)

Phone numbers containing 10 and 11 digits
 

  • Phone numbers beginning with 1: For 10-digit numbers, data will be saved in a format using parenthesis. Ex:1234567890 will be saved as (123) 456-7890.  For 11-digit numbers, the "1" is dropped and data is saved as a 10-digit number: Ex: 12345678901 will be saved as (234) 567-8901.
  • Phone numbers beginning with any other digit: For 10-digit numbers, data will be saved in a format using parenthesis. Ex: (234) 567-8901.  This is not true for 11-digit numbers as they are stored without any formatting.  Ex: 23456789012 will be saved as 23456789012.


Note: 
If you do not want the parentheses-space-hypen formatting for a 10 or 11-digit number, enter a “+” before the number (Ex: +49 1234 56 78-0)
 

Phone numbers containing 10 digits and a "-" (hyphen) 

Phone numbers that contain a hyphen behave differently in Classic and in Lightning Experience.  Phone numbers with a hyphen ("-") will be saved as it is in Lightning but will be automatically formatted in Classic.

Ex: In Lightning 234-567-8901 will be saved as is.

Ex: In Classic 234-567-8901 will be automatically formatted to (234) 567-8901.

Knowledge-artikkelin numero

000385963

 
Ladataan
Salesforce Help | Article