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

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Mask / Hide text in a text box

(0) ShareShare
ReportReport
Posted on by 535

We have fields in CRM that need to be masked. Is there a way to mask text in a text box so it only displays a partial amount of data. For example, if we have Social Security Number, is it possible to make it display like this --> "###-##-1234" but still retain the real text behind the masking?

 

Can someone point me in the right direction on how to do this please?

Thanks!

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Jeremy Winchell Profile Picture
    1,165 on at
    Re: Mask / Hide text in a text box

    D S,

    Are you using CRM 2011 or CRM 4.0?  If you are using CRM 2011 you could create a HTML Web Resource with a Textbox or set of Textboxes and display the web resource on the form in place of the fields you need masked.  In the HTML Web Resource you could mask the fields without changing/disrupting the data in CRM.

    Another option if you did not want to go the Web Resource route would be to do this.  You could write JScript on Form Load to apply a mask using a regular expression or string functions like substring or replace etc.   In addition to just the masking you would also need to set the "SubmitMode" for that field to Never.  Otherwise, you would overwrite data.

    Finally, the last option that we have used is to have 2 fields for each item you want to mask.  1 field has the actual data and the 2nd field has the masked data.  Based on whether the data in that field has to be edited you can use a button within the form to change which field is displayed.  if they are just viewing the data then the masked version shows up.  If they hit an edit button then the normal field is displayed and edited.

    Good Luck and let me know if you have any other questions, feel free to contact me directly as well.

    Jeremy

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
HR-09070029-0 Profile Picture

HR-09070029-0 2

#2
ED-30091530-0 Profile Picture

ED-30091530-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans