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
Ben AebischerBen Aebischer 

Workflow Rule Auto Format Phone Number

I'm desperately looking for a workflow rule to automatically format the phone numbers for Contacts with Country = Switzerland as follows:
+41 xx xxx xx xx. I tried several workflow rules, but somehow didn't manage to accomplish this.
Thank you in advance for your input!
Mubeen QawiMubeen Qawi
Here are few links that might help you:

This is the link with regex pattern: I would try implementing the same regex captured in this thread and check if it works. If it works great, then I will update the Regex to accomodate the Phone format I am looking for.

Here's Salesforce article on Phone lenght and formatting:

Here another thread, which doesn't not update the field to auto formate via workflow, however, it will validate the user who enter incorrect Phone number format:

Hope this helps.

Ben AebischerBen Aebischer
Hi Mubeen,

Thank you for the answer. Actually I didn't want to do this via validation rule. The idea was to create a WF and to automatically update the format with +41 XX XXX XX XX. Thank you anyway.

Best regards,