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)

Input mask for custom field

(0) ShareShare
ReportReport
Posted on by 583

Hi:

I have a custom field (Single line of text) for a custom entity.

I want to format the data at input to be in the form 999-999-999.

In customizing the field I set the length to 11 and added a new input mask control using the format 000-000-000.

When I run the entity form however the only thing that occurs is the field length of 11 digits. There is no input mask format.

How can I achieve this? 

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Steve,

    I rechecked your scenario and I believe I have a good explanation. That mask formatting seems to work on tablets and on mobiles. Option to select this mask for webclient is blocked.

    Can you please confirm that you were testing this mask using webclient?

  • SteveWhyte Profile Picture
    583 on at

    Andrii:

    You are correct.

    I was using the web client. How can I get it on the web client?

    Steve

  • Suggested answer
    Zohaib Uddin Khan Profile Picture
    2,822 on at

    In the case of web client, option left is JavaScript. Input mask only works for Phone and Tablet. Thanks.

  • Suggested answer
    Community Member Profile Picture
    on at

    You can use addonkeypress function to format the field if the length is less than 11.

    mahadeomatre.blogspot.sg/.../keypress-methods-in-ms-crm-2016.html

  • Suggested answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Steve,

    As I mentioned already you can't make it work in webclient. Mask Control is not available for webclient at the moment.

  • SteveWhyte Profile Picture
    583 on at

    I am getting the following error when I use the addOnKeyPress method from the website example.

    Unable to get property 'addOnKeyPress' of undefined or null reference

  • Suggested answer
    Community Member Profile Picture
    on at

    addOnKeyPress only works for text and integer fields. Please share your code.

  • SteveWhyte Profile Picture
    583 on at

    I found out the issue. My field name was spelled incorrectly.

    Thanks to al for their assistance

    Steve

  • Verified answer
    Community Member Profile Picture
    on at

    Please mark the answer verified

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