function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
cmarkiewiczcmarkiewicz 

replication - phone number format

Hello. The Salesforce UI formats phone numbers to (xxx) xxx-xxxx. (Another post indicates that the import wizard does this as well.) However when a phone number is passed through the API, it does not get reformatted. Is there a way to force this through the API, or do I have to reformat the string that I send to it?

thanks
chris
DevAngelDevAngel

Hi Chris,

The salesforce.com ui actually only formats 10 and maybe 7 digit numbers.  The field actually can take any value and does not try to validate as a valid phone number.

This formatting is javascript base, so it can't be triggered on an API call.  Applying a simple format to your phone number string would do the trick.