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
propilot0316propilot0316 

Alert Based on Picklist Value

I need some help..  I have a visualforce page (see code below) that I created.  What it's suppose to do is display a warning if the DFU_Status__c = Complete.  DFU_Status__c is a picklist. 

 

Any help is appericated!

 

 

<apex:page StandardController="Case" >

<script type="text/javascript"> 

if (ISPICKVAL({DFU_Status__c}, "Complete")
{
  document.write('<font size=4 color=red>Warning!</font>');
}
</script>

  
</apex:page>

 

 

qsdunnqsdunn

I don't know any Javascript, so I can't comment on what you've written but in your situation I'd be inclined to do this using the "rendered" attrribute.

 

<apex:page StandardController="Case" >

<apex:outputText rendered="{(ISPICKVAL(DFU_Status__c, 'Complete')}" value="Warning!" />
  
</apex:page>
Bhawani SharmaBhawani Sharma

 

<apex:pageMessage summary="This pageMessage will always display. Validation error messages appear in the pageMessages component." severity="warning" strength="3" rendered="{!ISPICKVAL(DFU_STATUS__c, 'Complete')}"/>