I want to take all the phone numbers for a given contact in from a SOQL query (which provides the phone number in a raw format) and then have all of the phone numbers in this format as options in a drop down:
<display name of the phone field>: <formatted phone number>
I have figured it all out except for one thing: I haven't found a standard way of formatting phone numbers.
Is there a way to invoke Salesforce's phone number formatter (kind of like Date.format()
) so that I can run the incoming raw phone strings through that before concatenating it with the display name?
I understand it is possible to write my own method that would do this, but I would much rather use a standard formatter than to homebrew up my own. Using standard stuff is much better for locale adjustments and overall maintenance of the code.