web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Auto format data input? i.e. Phone Number, auto fill/get city/state from entering a zip, etc.

(0) ShareShare
ReportReport
Posted on by

Anyone know of a way to auto format different types of input data?

For example, when typing in a phone number it would be nice if the system automatically changed it from 0000000000 to (000) 000-0000

Or

When typing in a zip code for a lead/contact/account, the city and state are automatically filled in.

Thank you,

Kirk

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    tiagolvsantos Profile Picture
    740 on at

    You can make a custom made JS code that formats the field OnChange.

    Example:

    function phoneFormat(phone) {
      phone = phone.replace(/[^0-9]/g, '');
      phone = phone.replace(/(\d{3})(\d{3})(\d{4})/, "($1) $2-$3");
      return phone;
    }
  • Verified answer
    Fritz Camille Profile Picture
    580 on at

    Hi,

    Follow the information on this blog. It worked for me.

    www.powerobjects.com/.../formatting-a-phone-field-in-crm-2013

  • Community Member Profile Picture
    on at

    Thank you Tiago and Fritz!!!  That worked perfectly for the phone formatting.

    Now anyone have an idea about the City/State from a zip code?  Seems like it would be a 3rd part plugin?

    Thank you,

    Kirk

  • Suggested answer
    Karth Profile Picture
    on at

    Here's a blog article which explains how to standardize the telephone numbers in CRM.

    www.crmsoftwareblog.com/.../how-to-standardize-telephone-numbers-with-javascript-in-microsoft-dynamics-crm

    To auto-populate the City and State based on the Zip Code, you might have to use the web services provided by USPS or may be even the Bing map APIs

    Here's a thread which talks about this : forums.asp.net/.../1933860.aspx

  • Verified answer
    Community Member Profile Picture
    on at

    Phone number:

    www.powerobjects.com/.../formatting-a-phone-field-in-crm-2013

    This worked perfectly.

    Address:

    -format data input- like zip to get city and state

    stackoverflow.com/.../webservice-to-get-city-names-by-giving-zip-codes - City/State from zip  - programing  USPS has API

    http://ziptasticapi.com/ - City/State from zip - Ziptastic Free API

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans