A new knowledge base article has been published on our support portal.
In this scenario the business requirement is to format the main telephone number on the Account entity. The requirement is that if the phone number is 7 or 10 characters long we need to apply the formatting rules else leave the phone number as is.
7 Digit Rule
1234567 -> 123-4567
10 Digit Rule
1234567890 -> (123) 456-7890
N52 Formula Manager Solution
The Formula Manager solution works like this,
- We create a formula to execute on the ‘Create & Update’ event of the Account entity
- We set it only to execute when the Main Phone number gets set initially or updated
- It first cleans the telephone number by removing all non digits
- it then checks to see how many digits are in the phone number
- Depending on the number of digits it applies a Regex which in effect is the formatting rule or it leaves it as is
- It places the result back into the Main Phone field