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
LaurensBLaurensB 

' Using Visualforce Pages in Page Layouts and Mobile Cards' challenge

Hi,

I have a question. I can see this code is working fine in my org 
<apex:page standardController="Opportunity">
    <apex:outputLabel>{!Opportunity.Name}</apex:outputLabel>
    <apex:outputLabel>{!Opportunity.StageName}</apex:outputLabel>
    <apex:outputText value="{!IF(Opportunity.StageName=="Prospecting", 'Test 1', IF(Opportunity.StageName=="Proposal/Price Quote", 'Test 2', IF(Opportunity.StageName=="Needs Analysis", 'Test 3', IF(Opportunity.StageName=="Negotiation/Review", 'Test 4','Test 5'))))}"/>
</apex:page>


But the challange keeps saying:

Challenge not yet complete... here's what's wrong: 
The page isn't evaluating the 'Negotiation Review' stage.


Very frustrating. Anyone an idea?
Much appreciated in advance.


 
Best Answer chosen by LaurensB
kaustav goswamikaustav goswami
The difference might be in the values - "Negotiation/Review" and "Negotiation Review". I would suggest you try the code without the slash and see what happens.

Thanks,
Kaustav

All Answers

kaustav goswamikaustav goswami
The difference might be in the values - "Negotiation/Review" and "Negotiation Review". I would suggest you try the code without the slash and see what happens.

Thanks,
Kaustav
This was selected as the best answer
LaurensBLaurensB
Shoot. That is it. Thank you. The stage name in the challenge is incorrect. I took the names from the orginating Picklist.
Sandeep BhanotSandeep Bhanot
Laurens - you're right that the challenge instructions were different from the default value of the stage (which is indeed 'Negotiation/Review'). This is confusing and so we've updated the challenge to test for the 'Negotiation/Review' stage value. Thanks for bringing this to our attention. 

Sandeep Bhanot
Salesforce.com
 
Robin Bansal 35Robin Bansal 35
Used below code to pass the challenge:
<apex:page docType="html-5.0" standardController="Opportunity">
    <style>
        .mypage .quote {
            margin: 12px 0;
            font-size: 64px;
            text-align: center;
        }
        .mypage .delta {
            font-size: 24px;
            text-align: center;
            color: green;
        }
    </style>
    
    <div class="mypage">
        Opportunity Stage Tips:
        <apex:outputLabel>{!Opportunity.Name}</apex:outputLabel>
        <apex:outputLabel>{!Opportunity.StageName}</apex:outputLabel>
        <apex:outputText value="{!IF(Opportunity.StageName=="Prospecting",'Tip1',
                                  IF(Opportunity.StageName=="Needs Analysis",'Tip2',
                                  IF(Opportunity.StageName=="Proposal/Price Quote",'Tip3',
                                  IF(Opportunity.StageName=="Negotiation/Review",'Tip4','Tip5'))))}"/>
    </div>
    
</apex:page>