Adding a field to display an Image. e.g. Product Photo

Less than one minute read time.

Below is a screen that shows the product configuration area in Sage CRM.

To create this field I added a new field to the NewProducts table within the administration screens.

I called my field 'prod_productImage' and used the Entry Type 'WWW URL'. The field has a length of 200 and an entry width on 100.

I then added the field to the New Product screen 'ProductSummary'.

I put the field on a new line and allowed it to stretch over 5 columns.

I also added the following script into the custom content box.

[code language="Javascript"]
<script>
crm.ready(function () {
var myfield = crm.fields("prod_productImage")
if (myfield.getMode()=="view")
{
myfield.urlToImage({src:myfield.value(),width:100})
}
})
</script>
[/code]

The image is entered as a URL.

E.g.

http://[img].[myserver]/images/I/81ONPcrUG7L._SL1500_.jpg

Once the image has been entered and saved field shows the URL as an image.

Anonymous