Notifications
Announcements
I'm trying to create a field in Dynamics CRM that will hold a Social Security number value. Not sure what the best method would be.
Ideally I would prefer the field to hold numbers-only, then get reformatted as XXX-XX-XXXX upon save in Dynamics. Is this possible?
You could write a bunch of JS to do that masking, but really it would only look secure and could be easily circumvented by a user who knows just a little bit about web browsers.
Instead, Id suggest that you use Field level security to hide the real value. This will actually provide real security, though it will not display with hyphens or enforce the presence of hyphens (link).
... You can also (separately) enforce the presence of hyphens (so when entering a value users can just enter 9 numbers and they hyphens will magically appear) using input masking (link).
Hi @gsfortis
The input mask control would have been useful however it's been retired/deprecated now. An alternative would be to use a PCF control. You can either build your own control or there are various input mask controls that you can download from the following website:
https://pcf.gallery
I hope you'll find this information useful. If you appreciate my efforts then please give a Thumbs Up to my reply. If it helps you resolve the issue then please accept it as a solution.
Kind regards
Gulshan
I think this is the answer I was looking for-- just not the answer I wanted.
The deprecated Input Mask Control is what I want, and I'm sad it's already retired. I didn't find any pre-built PCF solutions for the format I want (not for an American SSN), and I just don't think building my own is within my skillset.
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.
In our never-ending quest to improve we are simplifying the forum hierarchy…
We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
WarrenBelz 711 Most Valuable Professional
Michael E. Gernaey 319 Super User 2025 Season 2
Power Platform 1919 268