+ Start a Discussion

International Phone formatting based on country code

Has anyone seen a formula that based off the country field being a foreign country than the phone field would format to the correct sectioning of the phone number
Country Field = China
THAN update phone field upon save to
Phone Field=  +86 (10) 6505 0998
Any help would be appreciated.
Thank you
Rahul Kumar 455Rahul Kumar 455
Hello CirrisFC
Make County field as Controling Field and add a dependent picklist for country code.
If you want to use formula then add case function for each country code and update the country code prefix before saving the record to display the phone number prefixed with country code. Hope this helps.

Igor Petrovych 4Igor Petrovych 4
Hey! I have good news for you. We have ported the libphonenumber library to Salesforce (Apex). It has a lot of advanced features, including formating of phone numbers. Most of all - it's available for free (https://appexchange.salesforce.com/appxListingDetail?listingId=a0N3A00000G12oJUAR). In case you have any issues or need some help don't hesitate to contact me or our team at Noltic (https://noltic.com/)