How to prevent salesforce from auto- formatting phone numbers

I am using a lightning component to display a phone number.

I am currently in France and i want all the phone numbers to follow local formatting, which is not the case when i use the lightning component (Phone numbers are properly displayed in salesforce user interface).

So instead of displaying : 0474391085

i am getting : (047) 439-1085

He is the code i am using to display the phone number along with a bunch of other fields :

 some code here for aura iteration
<lightning:outputField fieldName="{!eachItem}" class="slds-hyphenate" />
 some code here

I think that the lightning:outputField automatically recognizes the field as a phone and applies the standard US format.

Do you have an idea how to preserve the origin format ?


Source : Link , Question Author : Merabti Ibrahim , Answer Author : Community

Leave a Comment