Having consistency with formatted fields is a top priority for ‘best practices’ for good data entry in Dynamics 365 environments. Previously, JavaScript was needed to complete this, but with the New Unified Interface and new features consistently being released, Microsoft gave us a control called ‘Input Mask’.
With this control, it allows users to create formats that they want. For example, Phone Number, Birthday or Social Security Numbers are good examples of fields that can use the Input Mask control.
- Go to the customizations settings
- Find the entity and form that has the desired field that needs formatted
- Double click the field you want to format
- In the ‘Field Properties’ click on the Controls tab
- Click on ‘Add Control’ and select ‘Input Mask’ and click ‘Add’
- Next, you need to set the input of the mask, click on the pencil icon within the ‘Mask’ property
- The ‘Configure Property “Mask” ‘ window opens up, click on the “Bind to a static value” and fill in the format that you want your field to appear in.
- For example for a phone number, it would look like this (000)000-0000
- Click ‘Ok’ and then Save and publish the form
- Refresh the page and your field will look like below
- With this control, you can do any formatting you are looking for and the fields can be consistent.
Have any questions about forms or Microsoft Dynamics 365 Sales? Our Dynamics 365 team at Opal Business Solutions, a Microsoft Gold Partner, is ready to help. Click below to learn more about D365!