• Jessica Lay
  • NEWBIE
  • 0 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 2
    Replies
Hello,

I have an image formula field on Case which is showing one of the standard Salesforce flags (grren, yellow, or red) based on the time remaining on when the case should be resolved The formula for this field is below:

IMAGE(
IF((Minutes_to_Deadline__c > (SLA_Minutes_2__c * 0.25)),"/img/samples/flag_green.gif",
IF(Minutes_to_Deadline__c < 0, "/img/samples/flag_red.gif",

IF((Minutes_to_Deadline__c > 0 && Minutes_to_Deadline__c <=(SLA_Minutes_2__c * 0.25)) , "/img/samples/flag_yellow.gif",""

))),"None")


I am now trying to reference this field in a Visualforce page in the case console. I am able to save the page with this field in the code, but when I open the console and look at the component which is built from the visualforce page, it outputs the url of image (e.g. "/img/samples/flag_red.gif") instead of the image. I believe this was because I had "apex:outputText" in the code:

<apex:outputText value="{!con1.Case_SLA__c}"/>

I then changed this to be (although i know I'm missing something):

<apex:image id="flag" value="{!con1.Case_SLA__c}"/>

It now only shows a broken image.
User-added image
Does anyone know how I can get this to show the flag that is in the formula field? Or do I have to put logic in either the Visualforce page or Controller to show what I want it to show?

Thanks,
Adam
 

Hello,

 

I've built a formula field on a custom object that creates a QR code via the Google API. If I put the formula field on a page layout, it works perfectly.

 

When I include the field in an email template that is sent out via workflow, the image is not shown. In fact, if I look in the source code for the message, the image URL is completely different:

 

How the formula field is built:

IMAGE('https://chart.googleapis.com/chart?cht=qr&chs=200x200&chl=http://eventmasterb-developer-edition.na14.force.com/events/targetx_eventsb__markEventAttendance?cid='& TargetX_Eventsb__Contact__r.Id&'&eid='&TargetX_Eventsb__OrgEvent__r.Id, 'QR Code')

 

Example of formula field on actual record:

https://chart.googleapis.com/chart?cht=qr&chs=200x200&chl=http://eventmasterb-developer-edition.na14.force.com/events/targetx_eventsb__markEventAttendance?cid=003i000000G6tnN&eid=a0Fi0000002jzPS

 

Example of image in email source code after being sent via workflow:

<img src="http://na15.salesforce.com/servlet/servlet.ImageServer?oid=00Di0000000XnNU&esid=018i0000000P5Kf">

 

Any idea why Salesforce is creating an image internally for this, and not just rendering the img src the way it is in the layout?

 

Christopher Gioconda

gioconda@targetx.com