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
Andrew NorthAndrew North 

Return images based on Opportunity Record Type within a Visualforce Section

Hi

We have a visualforce section on all of our Opportortunity page layouts.
This section shows a particular image depending on what has been selected within the stage field.

Below is a sample of the code that we have in place.
Is it possible to split it up so that depending on which Opportunity Record Type is selected different images can be displayed against each stage?

For example if record type = X and the stage is Closed Won then show image A

If record type = Y and the Stage is closed Won then show image B

Thank you

<apex:page standardController="Opportunity" showHeader="true" sidebar="true">

<div align="center">

></apex:image> <apex:image id="won" value="{!$Resource.stageWon}" height="60" rendered="{!Opportunity.stageName = 'Closed Won'}" ></apex:image> <apex:image id="lost" value="{!$Resource.stageLost}" height="60" rendered="{!Opportunity.stageName = 'Closed Lost'}" 

</div>

</apex:page>