You need to sign in to do that
Don't have an account?
Digu
Phone Numbers Formatting
I have various phone number formats , such as
1. +1 (234)-(345)-(3456)
2. 2343453456
3.+45 (234)-(345)-(3456)
4. Some are not even 10 digit numbers . (234-3456)
on Account object .
Do you have any idea how to format , all these different formats, into one single format .
(234)-(345)-(3456)
I am thinking of executing a piece of code, through Console . Any sample codes will be appreciated .
Thanks !!
Digu
1. +1 (234)-(345)-(3456)
2. 2343453456
3.+45 (234)-(345)-(3456)
4. Some are not even 10 digit numbers . (234-3456)
on Account object .
Do you have any idea how to format , all these different formats, into one single format .
(234)-(345)-(3456)
I am thinking of executing a piece of code, through Console . Any sample codes will be appreciated .
Thanks !!
Digu
Below is a static method that will reformat a phone number. The method removes characters, and it will check for strings of numbers that are 10 or 11 digits long. The logic would need to be changed to process international numbers.
You can query on account and pass phone no. to this , it will return a string and you can update the phone number,
Hope this will help, let me know in case of any doubt
--
Thanks,
Swayam
@salesforceguy
Yes, we can update the unformated phone number (not 10 digit numbers) but we can NOT "click to call". Seemly "click to call" feature does not execute unformatted phone number. Right? For example, it does not work with short extension with 5 digit numbers.
Thanks,
Nhan