POWEROBJECTS

718 Washington Ave. N. Suite #101
Minneapolis, MN 55401
View map and all Locations

Send us a message

Microsoft Dynamics CRM 2013 has the capability of creating a phone number field. This is a great feature as it allows for click-to-call functionality directly from the Dynamics CRM record.

crm-101

However, you may wish to have the display of the phone number formatted as well. Formatting the phone number would provide additional benefits, as it would allow the phone data to be displayed in a uniform fashion. For example, all phone numbers can be displayed in the format (XXX) XXX – XXXX.

In order to accomplish this, one must add a JavaScript code to the phone field as an OnChange event.

Steps:

1. Create a web resource (FormatPhoneNumber). To do this, click Settings > Customizations > Web Resources.

2. Add the JavaScript code to the web resource. To format phone number filed as (XXX) XXX – XXXX), use the following code:

3. Add the web resource to the form library of the phone number field and set up the OnChange event.

formatting a phone field in CRM 2013

Formatting a phone field in CRM 2013 additional img

4. Save and publish the customizations.

Result:

formatting a phone field in CRM 2013

Formatting a phone field in CRM 2013 with Java Script code is easy if you follow these steps!

If you need additional assistance with creating JavaScript or with any Dynamics CRM related topics, check out our other blogs.

Happy CRM’ing!

Avatar for JoeCRM

JoeCRM

Joe CRM is a CRM superhero who runs on pure Microsoft Dynamics CRM adrenaline. As the face of PowerObjects, Joe CRM’s mission is to reveal innovative ways to use Dynamics CRM and bring the application to more businesses and organizations around the world.