• dhruv mehta 15
  • NEWBIE
  • 10 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 1
    Replies
Hi everyone,

I have used the following codes for Creating & Using Custom Controllers Trailhead Challenge .

for New Case list

<apex:page controller="NewCaseListController">
    <apex:form >
        <apex:pageBlock title="Case List" id="Case_list">
         <apex:repeat value="{!NewCases}" var="cs">
         <table style="width:1000px;">
          
<tr>
 <apex:repeat value="{!NewCases}" var="case">
        <apex:outputLink value="https://na16.salesforce.com/{!cs.Id}">{!cs.CaseNumber}</apex:outputLink>
         <apex:outputLink value="{!cs.CaseNumber}">{!cs.CaseNumber}</apex:outputLink>
        </apex:repeat> 
             </tr>
        </table>
             </apex:repeat>
        </apex:pageBlock>
    </apex:form>
</apex:page>

and for NewCaseListController

public with sharing class NewCaseListController {

    public List<Case> getNewCases()

     {
       List<Case> results =Database.query('SELECT ID, CaseNumber FROM Case LIMIT 10');

       return results;

    }
}

However i am getting an error saying Challenge Not yet complete... here's what's wrong: 
The outputLink component is not binding to the ID of a case

Please help
<apex:page standardController="contact">
    <apex:form>
        <apex:pageBlock title="Edit Contact">
            <apex:pageBlockSection Columns="1" >
                <apex:inputField value="{! Contact.FirstName}"/>
                <apex:inputField value="{! Contact.LastName}"/>
                <apex:inputField value="{! Contact.Email}"/>
            </apex:pageBlockSection>

            <apex:pageButtons>
                <apex:commandButton action"{!Save} value="Save"/>
</apex:pageButtons>apex:pageBlockButtons>
                                 
</apex:pageButtons>apex:pageBlock>
</apex:form>
</apex:page>


this is the code i had written but its got some error.error msg
<apex:page standardController="contact">
    <apex:form>
        <apex:pageBlock title="Edit Contact">
            <apex:pageBlockSection Columns="1" >
                <apex:inputField value="{! Contact.FirstName}"/>
                <apex:inputField value="{! Contact.LastName}"/>
                <apex:inputField value="{! Contact.Email}"/>
            </apex:pageBlockSection>

            <apex:pageButtons>
                <apex:commandButton action"{!Save} value="Save"/>
</apex:pageButtons>apex:pageBlockButtons>
                                 
</apex:pageButtons>apex:pageBlock>
</apex:form>
</apex:page>


this is the code i had written but its got some error.error msg