function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
jamesp@furyjuice.comjamesp@furyjuice.com 

Quote PDF imges with a workflow

Ok, 

 

Almost cracked the nut but I have fallen short on the formula/work flow. 

 

Scope: 

Want to create a Quote PDF that shows an image of the main machine that is beign purchased. There are a total of 4 main machines. 

 

From my digging around I have come up with the following solution

In the Quotes

1. Create a pick list Machine Types with options A,B,C,D

2. Create a Custom field Text (Rich) called Image

3. Store all 4 product images in documents

4. Create a work flow (this is where I get stuck) When A,B,C or D are selected Change Field Images to the url of Image A,B,C,D

 

Effect: you select the machine type and the Image field auto changes the Image field with the image. When I create the PDF Quote I get a nice picture of the Machine selected. 

 

Am i barking mad or almost there? any help would be tops. 

 

 

vlachavlacha

Hi James,

 

in order to display images in custom fields you can use the formula fields, which should basically point to the URLs of the images. The formula syntax for Image URL could look like this (field is called Picture_URL__c): 

IF(ISBLANK(Picture_ID__c),"","/servlet/servlet.FileDownload?file=" & Picture_ID__c)

 and the return type will be a text.

 

The next step is to display the image (again formula field with text return type):

IMAGE(Picture_URL__c,"Picture")

The last step will be to create separate workflows for each image you want to display and change Picture_ID__c value accordingly.

 

I hope this can help you.

 

Cheers!

 

vlacha

jamesp@furyjuice.comjamesp@furyjuice.com
Thanks for that I will give it a go. So instead of using a text (rich) field I need to use the formula field that makes more sence.

When I drop the url link in which part of the link do I use?
Thanks heaps for the guidance.
vlachavlacha

Hi again! 

 

Basically the URL formula field will give you the location of picture, which is saved in your document folder. Let say, the picture can be found under

https://na15.salesforce.com/015i0000000qDgH

 

If you execute the following link

 

https://c.na15.content.force.com/servlet/servlet.FileDownload?file=015i0000000qDgH

 you will be able to load and display the picture.

 

By executing the first formula field you will point to the exact picture location (Picture_URL__c): 

 

/servlet/servlet.FileDownload?file=015i0000000qDgH

 

 

The other formula field with the function IMAGE(Picture_URL__c,"Picture Name") is just used for display.

 

The workflow rule which will trigger the dispaly of the image can be bound to a custom field, which is holding the Picture ID, e.g. Picture_ID__c.

 

So one rule will be "if machine of type 1 then set Picture_ID__c to 015i0000000qDgH".

 

I hope it makes it clearer for you.

 

Cheers!

vlacha