FTP Images in Salesforce Lookup Dialog

Friday, July 6, 2012 by Aslam - The Alexendra
Hi All,
Recently one of my clients needed one product selection lookup dialog with product images in it. The requirements were as below:

1) Images must not be stored in Salesforce, they want to store images in their own FTP server
2) When user click on create new record, user can select Product from lookup dialog, the same time, in product dialog, user can see the images respective to that particular image. So that it will be easy for user to judge the selection.

So, here is the solution i came up with.

1) Store your images in remote FTP server in a folder, for example, i saved my product images at following location:

2) Give images some unique name similar to ProductCode field of your products like CM_111.jpg, CM_222.jpg, CM_333.jpg etc

3) Now create one "Product Image" formula (text) field on product object like below:

IMAGE("http://labs.aslambari.com/products/" & ProductCode & ".jpg", ProductCode)

4) Add this field into your product lookup dialog layout (Search layouts)

5) Now, whenever you will click on any Product lookup field in your org, you will simply see the product image of that particular product code.

Please check the live demo here.

Click on Product lookup field, Select "Product Family" filter , equals to , "Camera" value. You will see all products with images. See below screen shot.

Hope this will help some developers to achieve this kind of requirement sometime.

Aslam Bari


Unknown said...

So Simple, So Effective.

Chamil Madusanka said...

Good Job Aslam

Gary Secor said...

great solution

Abdul Vahid said...

Very Nice and Useful :)

Admin said...

A nice post aslam..waiting for more informative posts from you.


Unknown said...

Hi Alexendra, Thank you for your post. I tried this process. But this Images are not displayed inside the Quote templates. Is there any solution to display this images inside the Quote templates? Can you please send solution to My mail:dhanunjata520@gmail.com

Aslam - The Alexendra said...

Are you trying to make Image formula field using http image url.
Can you confirm your image is public access enabled, not beyond any credentials.

landing page optimization said...

May I simply say what a relief to uncover a person that genuinely understands what they are talking about online. You certainly understand how to bring a problem to light and make it important. Thanks for sharing !

Lisa Rodrigues said...

Amazing solution - does anyone know if the images keep their format in a quote?

Unknown said...

Can you please send me the code

Unknown said...

I want to store the imges in FTP server and display in salesforce can you please guide me on this.

Thanks in Advance

Post a Comment