Hi Team – Is it possible to load an image into a script field. I have a Trade Summary form and want to get the first image from my link form (Trade Journal form) and display it within my Trade Summary Layout form. Not sure if I am using the correct image properties, but here is a small sample of my code in the script field.
let linkTradeJournal = record.getFieldValue('fld-310f922806294fcda6e0215c29b7b1ff');
for (rec in linkTradeJournal){
//-- Only need the first entry of the record set
let img = linkTradeJournal[rec].getFieldValue('fld-f2a5d1f9d7cc4ef9bc96e25f3aa3497b');
return img[0].mimtype;
}
thanks,
rocky
Hi Rocky,
Script fields cannot display images, but you can write a script to add an image to a Photo field. There’s an API for getting an image from a URL:
record.addPhotoFromUrlToField(image_url, photo_field_id);
Hi Brendan – I thought so, but thought I would ask. Yesterday, I implemented what you have recommended.
Thanks again,
rocky