You need to sign in to do that
Don't have an account?
TNieman
Display a banner on Case Layout
I have successfully created a small banner on the top of the Case layout with a simply VF page
I would like to create a new page that changes the background color based on Severity__c field. See below
<apex:page StandardController="Case" showHeader="false" standardStylesheets="false" sidebar="false"> <body style="background-color:lightblue;"> <div align="center"> <h2>HCM Parent Case - {!Case.CaseNumber}</h2> </div> </body> </apex:page>Sample rendered
I would like to create a new page that changes the background color based on Severity__c field. See below
//for Severity__c = 'Severity 1' <body style="background-color:red;"> <div align="center"> <h2><b>Severity 1 Case</b></h2> </div> </body> //for Severity__c = 'Severity 2' <body style="background-color:yellow;"> <div align="center"> <h2><b>Severity 2 Case</b></h2> </div> </body> //for everything else display nothingI'm not sure how to accomplish this. If it is not possible to have the "everything else" be empty, I could add the 2 remaining values of Severity__c as different colors
You can put stylesheet based on the severity of the case. I tried the same thing with status value in my dev org and below is the code for the same
Please note that you can nest the if statement as well if required. In your case replace Status with your severity__c and values to your severity values.
Hope this helps.
All Answers
You can put stylesheet based on the severity of the case. I tried the same thing with status value in my dev org and below is the code for the same
Please note that you can nest the if statement as well if required. In your case replace Status with your severity__c and values to your severity values.
Hope this helps.
I am getting an error stating "Content cannot be displayed: SObject row was retrieved via SOQL without querying the requested field: Case.Is_CR_Parent_Case__c".
This worked with a custom field Severity__c in the previous vf page without having a query. Why doesn't this one work? The Is_CR_Parent_Case__c is on the page layout, so it Change_Management_Indicator__c.
I know I'll need to have more code to change the color of the text to make it white when the background is black. Just trying to get past the query issue first.