Skip to main content

Hello, I want to use image in my Skuid page from Notes and Attachments Related Lists. I am using an Custom Object for the same. Can you please guide me how to achieve it ? Please reply ASAP. Thanks. Arpit

Hi Arpit, to do this, you will need to pull in the attachments for your custom object as a separate model. To do this, create a model on the attachment object and then set a condition on the “ParentId” field to be of the type “Field from another model”. Link it to the Id on your custom object. This model will now pull in attachments that are attached to your custom object. Next you can use a template component to display the image. Drag a template component on to your screen, set the model to your attachment model, check the “Allow HTML” checkbox and enter this as your template…


<img src="/servlet/servlet.FileDownload?file={{{Id}}}"></img> 

However, there are a few problems with this approach. First, there could be multiple attachments attached to your custom object record and these attachments are not guaranteed to be images. Another approach to solving this problem is by using the Skuid File Object and File Component. There is a tutorial on that here. Let me know if this helps.


Hi Ben, Thanks for your Reply.So is there any way to restrict it to take single file if there are multiple files Present. I also use the File component but fir this we have to first upload the image we can not use the Previously stored Sales force Image in case of File Component i think. Also can i use the Social Profile photo of the Person. Thanks. Arpit


Hi Arpit, You can restrict the attachments model by adding additional conditions on fields like Name, Description, or ContentType. You could also put a LIMIT 1 on that model by going into the advanced properties of that model. We can get at the chatter photos for users, but not for Social Contacts, Accounts or Leads. As far as I know, Salesforce has not provided an API or any way to access this information. There is <a href=https://success.salesforce.com/ideaView?id=08730000000bOFxAAM">this idea for that feature in salesforce.