It's been quite a while since the input mask PCF control has been retired in Dynamics 365 CE.
I recently had to implement a mask on phone number fields and was disappointed to learn that Microsoft had retired the control and hasn't offered any alternatives.So I had to look for other options and I came across this Check Phone Number PCF control which I found it to be very comprehensive. You can read the full documentation on github.
Steps and options to configure
- Once you download and import the solution, you can select the field on which you want to enable the component.
- The Output format helps you transform to the following:
- International: +91 87855 85545
- National: 87855 85545
- E164: +918785585545
- You can setup the default country code. When you enter the number without any code, a default country code is automatically setup.
- You can also setup a list of allowed and excluded country codes. To setup the allowed country codes, you can follow the list here or check the screenshot for an example: ISO 3166 (alpha 2) country codes needs to be used.
- You can also specify whether you want to phone call button to be shown and which app must be the default calling app.