You need to sign in to do that
Don't have an account?
Jaime Ray
Is there a way to show a red, yellow, or green image on the account based off when we closed won last opportunity
A user said at his old job that they have a image on the account page based off when the last closed won opportunity was.For example if it has been more than a year since the customer had a closed won opportunity, there would be a red image on the account page.
I am new to using forumla fields. I was wondering if someone could help me out please.
I am new to using forumla fields. I was wondering if someone could help me out please.
IF( FLOOR( (TODAY() - ClosedwonOppsRollUpField__c )/365.2425) == 0, IMAGE(" /resource/Green",'Good') , IMAGE(" /resource/Red",'bad'))
All Answers
Here is my quick answer
1. Create a visualforce page , code is here
<apex:page standardController="Opportunity" tabStyle="Opportunity">
<apex:outputpanel rendered="{!Opportunity.StageName == 'Closed Won'}">
<div style="background-color:#F00">Closed Won</div>
</apex:outputpanel>
</apex:page>
I am using color code (css) but you can upload images in resources and based on your logic you can show and hide them.
2. Now go to Layout of Opportunity and embed this visualforce page anywhere in layout.
If you need more help please let me know.
Thanks
Lokesh
- Images: Save it in Static Resources e.g: green, red and yellowdot. Make static resources as public
- Get the latest closed won opportunity on Account - I would have a rollup summary field for max closed date with opportunity with stage "Closed won" or something
- Display the image
Create formula field of type textIF( YEAR(TODAY()) - YEAR( ClosedwonOppsRollUpField__c ) == 0, IMAGE(" /resource/Green",'Good') ,
IF(YEAR(TODAY()) - YEAR( ClosedwonOppsRollUpField__c ) == 1, IMAGE(" /resource/Yellow",'not bad') , IMAGE(" /resource/Red",'bad')) )
I have tried what you suggested. I would like a red line to show on the account page if there has not been a closed won opportunity in the last year.
that worked.
what if I want it to show up 1 year to be red.
try to just use eonly red or green. but I am getting an error message saying Error: Syntax error. Extra ','
IF( YEAR(TODAY)) - YEAR( ClosedwonOppsRollUpField__c ) == 0, IMAGE(" /resource/Green",'Good') ,
IF(YEAR(TODAY)) - YEAR( ClosedwonOppsRollUpField__c ) == 1, IMAGE(" /resource/Red",'bad'))
IF( FLOOR( (TODAY() - ClosedwonOppsRollUpField__c )/365.2425) == 0, IMAGE(" /resource/Green",'Good') , IMAGE(" /resource/Red",'bad'))