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
Russell baker 1Russell baker 1 

add light indicator on page layout

Hi,
I want to add red light and green ligh indicotor on Opportunity page layout. If opportunity is in On-Hold stage then it should be Red else green.
where can i get image file? and how can i show it in page layout.
Please help.
Best Answer chosen by Russell baker 1
BALAJI CHBALAJI CH
Hi Russell,

Try following below steps to acheive the requirement.
  1. Create a custom field of Formula type and Text as return type in Opportunity Object.
  2. Provide formula in the formula editor such that if the Stage value is On-Hold, it should display Red light else Green light.
Here is the Sample formula,
IMAGE( 
CASE( StageName, 
"Closed Won", "/img/samples/flag_green.gif",
"Closed Lost", "/img/samples/flag_red.gif", 
"/s.gif"), 
"Priority Flag")

I used Red flag and Green flag if the StageName is Closed Won or Closed Lost respectively. These are the sample images provided in Developer Edition. You can also provide a links for the images.

Please find below links and let me know if that helps you.
https://help.salesforce.com/HTViewSolution?id=000007604
https://developer.salesforce.com/docs/atlas.en-us.usefulFormulaFields.meta/usefulFormulaFields/useful_advanced_formulas_image_links.htm

Best Regards,
BALAJI