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 579

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

  • Verified answer
    RE: Input mask for custom field

    Please mark the answer verified

  • SteveWhyte Profile Picture
    SteveWhyte 579 on at
    RE: Input mask for custom field

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

    Thanks to al for their assistance

    Steve

  • Suggested answer
    RE: Input mask for custom field

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

  • SteveWhyte Profile Picture
    SteveWhyte 579 on at
    RE: Input mask for custom field

    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
    a33ik Profile Picture
    a33ik 84,325 Most Valuable Professional on at
    RE: Input mask for custom field

    Steve,

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

  • Suggested answer
    RE: Input mask for custom field

    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
    Zohaib Uddin Khan Profile Picture
    Zohaib Uddin Khan 2,811 on at
    RE: Input mask for custom field

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

  • SteveWhyte Profile Picture
    SteveWhyte 579 on at
    RE: Input mask for custom field

    Andrii:

    You are correct.

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

    Steve

  • Suggested answer
    a33ik Profile Picture
    a33ik 84,325 Most Valuable Professional on at
    RE: Input mask for custom field

    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?

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,409 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans