Image
Learn about Image attribute.
If a control contains a document field with the Image
attribute checked,
users can upload image files and display a preview (e.g. to show pictures of products in
the Item Master info area (AR)). For further details, see Uploading Documents.
Image
attribute only works for document fields defined in the data
model ("Document" property checked). For further details, see Data Model in the CRM.Core Administrator
Guide.Valid parameters for the Image
attribute:
Parameter |
Default |
Description |
---|---|---|
|
2048 |
maximum allowed width of a picture in pixel (checked before upload) |
|
2048 |
maximum allowed height of a picture (checked before upload) |
|
n/a (see below) |
maximum width of the picture preview in the document field |
|
Expand: 256 MiniDetails: 128 other views: 96 |
maximum height of the picture preview in the document field |
|
.gif|.jpg|.png|.bmp |
list of allowed extensions (checked before upload) |
Use JSON syntax for specifying the parameters.
Example: {maxHeight:200, maxWidth:300, allowedExtensions:"
.jpg
|
.png
"}
The document upload dialog shows the defined defaults.
Calculation of previewWidth
and previewHeight
:
-
previewWidth
and previewHeight
not set: The defaultpreviewHeight
is used.previewWidth
is the maximum available width. The aspect ratio of the image is taken into account. - Both
previewWidth
andpreviewHeight
set: Both parameters are applied. Images with another aspect ratio is distorted. -
previewWidth
set:previewHeight
is calculated based on the aspect ratio of the image. -
previewHeight
set:previewWidth
is calculated based on the aspect ratio of the image.Note: If the calculatedpreviewWidth
exceeds the maximum available width, the maximum available width is used instead.previewHeight
is re-calculated based on the aspect ratio of the image.
For Details and MiniDetails controls you can use the Colspan
and
Rowspan
field attributes to control the position of the picture in
relation to other fields. For further details, see Colspan and Rowspan.
Rowspan
for an image field on a multi-column mask, the
vertical alignment of the elements (without Rowspan
defined) next to the
picture is handled differently by different browsers.