Views:

Scenario Overview

In this scenario you need to format the main telephone number field of the Account entity. The format needs to look like this "207.555.3652". This makes the phone number formatting consistent across all accounts. It must also be able to strip out all non digit characters so if a user enters fields such as these they are ignored  e.g. '(', ')', '-'.

Note 1: This formatting rule must apply in the following scenarios,

-User enters data from Outlook,
-User enters data from the browser Web Client,
-User enters data from Mobile Client,
-Records are imported (e.g. via a CSV or Excel file)
-Data comes from an external data source such as a Portal.
-Data comes from an external data source such as an Integration Server

North52 Decision Suite Solution

The North52 Decision Suite solution works like this,

  • We create a formula that executes on the server-side when ever the Main Phone number field on the Account entity changes.
  • Next we use a Regular Expression to remove all the non-digit characters
  • We then use another Regular Expression to apply our formatting
  • Then we take the overall result of the formula & place it into the Main Phone number field

North52 Decision Suite Steps

  • Create a new formula of type 'Save to Current Record'
  • Set the Source Entity to 'Account'
  • Set the Source Property to 'Main Phone'
  • Set the Target Property to 'Main Phone'
  • Copy & paste the formula below into the formula description field & click save
  • You are ready to test

Formula

RegexReplace(RegexReplace([account.telephone1], «\D», ''), «(\d{3})(\d{3})(\d{4})»,«$1.$2.$3»)

Did you know?

We listen to customer feedback!

Although our business rules engine for Dynamics 365 has over 500 functions, sometimes you'll come across a requirement for which we don't provide a specific function for. Let us know the details and our team will be happy to review your requirement or suggestion and either provide a solution from our existing toolset or look to enhance our product to meet your requirements. 

You can make suggestions on our ideas page or email us directly at support@north52.com