Dynamics 365 Business Central: How to set the extended data type of a field (ExtendedDataType Property)

Dynamics 365 Business Central

Hi Readers.
This time I’d like to talk about how to set the extended data type of a field (ExtendedDataType Property) in Dynamics 365 Business Central.
For Example:

ExtendedDatatype = EMail;

The property affects the layout and behavior of controls on a page. Use this, for example, to display a field as an email address.
By applying special meaning or semantics to a field, the value of the table field is converted to a text field of the new data type that may apply special validation, a different way of displaying the value or interacting with the field.

The developer has two choices to apply this.
・Page Fields : Only in selected pages


・Table Fields : In all pages

Note: If you set different extended data types in page and table at the same time, the extended data type set on the page will take precedence.

Extended data types can only be used on specific field types according to the following table:

Extended Data TypeValid Field TypesDescription
NoneAnyDefault value. No conversion is applied.
Phone No.Text, CodeThe client handles the field as a phone number and will display this as hyperlinked whenever the field is not editable. Activating the hyperlink will launch the default dialing app on your device.
URLText, CodeThe client handles the field as a URL and the text will be displayed as hyperlinked whenever the field is not editable. Activating the hyperlink will open the URL using the default browser on your device.
EmailText, CodeThe client handles the field as an email address and will display this as hyperlinked whenever the field is not editable. Activating the hyperlink will launch the default mail app on your device.
RatioInteger, BigInteger, DecimalThe text is handled as a progress bar. This is not supported on the Web client.
MaskedAnyDisplays the value as dots. This will only have effect on fields, where the user can enter and display textual data (including numbers, time, date etc.)
PersonMedia, MediaSetThe client handles the field as media representing a person and will display this in the signature rounded styling. When the media field is empty, a silhouette of a person is shown.

There are currently 5 types of extended data that can be used in web client of Business Central, let us take a look at samples one by one.

Phone No.: ExtendedDatatype = PhoneNo

Activating the hyperlink will launch the default dialing app on your device.

URL: ExtendedDatatype = URL

Activating the hyperlink will open the URL using the default browser on your device.

Email: ExtendedDatatype = EMail

Activating the hyperlink will launch the default mail app on your device.

Masked: ExtendedDatatype = Masked

Use the “Masked” data type to display dots instead of characters on the sensitive text field in the UI. such as a password, an access key, a credit card number etc.

Person: ExtendedDatatype = Person

A silhouette of a person is shown when the media field is empty.

Note: If the extended data type of the media is not set, a silhouette of a item is shown when the media field is empty.

PS:
1. For Ratio:
Although Microsoft’s documentation states that this is not supported on the Web client, you can set it in AL.

And show ratio in web client.

2. ExtendedDatatype Setting in C/AL:


Find out more about ExtendedDataType Property from Microsoft Docs.

END

Hope this will help.

Thanks.

コメント

Copied title and URL