ViewProperty properties

Version:

The ViewProperty model defines a set of properties that characterizes an EntityView property. The ViewProperty properties define what to display, and provides hints allowing the user interface to choose the appropriate control for the display of EntityView properties in the user interface.

Any Commerce plugin can influence what data is returned by adding, removing, or modifying properties before the view is returned.

The following table describes ViewProperty properties:

PropertyDescription
NameThe common name of the view property. This can be shared among views and is used to localize the DisplayName (string).
DisplayNameThe localized name of the property. By default, the property is not localized and its value is the same as the Name field (string).
ValueThe value of the property, typically a raw value and its formatting.
RawValueDirect value from the mapping with no formatting. The value is formatted using policy-based formatting (string).
OriginalTypeThe value of the OriginalType is the "ViewProperty" raw value system type, for example, System.DateTimeOffset, System.Boolean, and so on. If a value is not specified, it is set to the FullName of the type of the value used for RawValue.
IsHiddenIndicates whether the view property is displayed or not in the user interface.
IsReadOnlyIndicates whether the view property is read only or requires a set value.
UiTypeControls how the property is rendered inside the view. The following UI types are used to render default views in the Business Tools: "EntityLink", "Autocomplete", "tags", "Options", "List", "SubItemLink", "tags", "html", "Dropdown", "MultiLine", "DownloadCsv".

If not specified, then the property field value is rendered as simple text.
IsRequiredIndicates whether the property is mandatory.
PoliciesContains any constraints, closed vocabularies, and so on, as policies for actions (string).
If you have suggestions for improving this article, let us know!