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)

CRM Text Filed Format Masking (XX-99-9999)

(0) ShareShare
ReportReport
Posted on by

Hi,

i am a little new to CRM...

Can anyone tell me how to format a CRM text field to do the format mask (format mask -  XX-99-9999), can anybody help me with a script to do this...

Thanks

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Rajkumar Rajaraman Profile Picture
    on at

    Refer this blog:

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

  • Mahendar Pal Profile Picture
    45,095 on at

    Nothing related to CRM much actually, apart from that getting value and setting value to CRM field, and call your method on Onchange of the field.

    You can simply look for the sample code to format phone number using java script and use that in CRM, just you need to pass that value from the field.

    function FormatPhone()

    {

    var Value=Xrm.Page.getAttribute("phonenumber").getValue();

    Xrm.Page.getAttribute("Phonenumber").setValue(FormatNumber(Value));

    }

    function FormatNumber()

    {

    //you can get this code easily, if yo will try to search, very common requirement

    }

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