• Abhishek Shukla 97
  • NEWBIE
  • 20 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 1
    Questions
  • 3
    Replies
I am practicing the Trailhead and in this Module : Visualforce:Use Standard List Controllers 
https://trailhead.salesforce.com/content/learn/modules/visualforce_fundamentals/visualforce_standard_list_controllers

I have used code given in this module but I found that all of the conatcts are not rendering as Its limiting to the contact list till letter J. 

I am submitting the code here: 

<apex:page standardController="Contact" recordSetVar="contacts">
   <apex:form>
    <apex:pageBlock title="Contacts List" id="contacts_list">
        Filter: 
  <apex:selectList value="{! filterId }" size="1">
    <apex:selectOptions value="{! listViewOptions }"/>
    <apex:actionSupport event="onchange" reRender="contacts_list"/>
   </apex:selectList>
        <!-- Contacts List -->
        <apex:pageBlockTable value="{! contacts }" var="ct">
            <!-- Pagination -->
         <table ><tr>
             <td>
           Page: <apex:outputText 
         value=" {!PageNumber} of {! CEILING(ResultSize / PageSize) }"/>
          </td>           
    <td align="center">
        <!-- Previous page -->
        <!-- active -->
  
        <apex:commandLink action="{! Previous }" value="« Previous"
     rendered="{! HasPrevious }"/>
     
        <!-- inactive (no earlier pages) -->
    
        <apex:outputText style="color: #ccc;" value="« Previous"
     rendered="{! NOT(HasPrevious) }"/>
 
<!-- Next page -->
<!-- active -->

        <apex:commandLink action="{! Next }" value="Next »"
       rendered="{! HasNext }"/>

        <!-- inactive (no more pages) -->

        <apex:outputText style="color: #ccc;" value="Next »"
     rendered="{! NOT(HasNext) }"/>
   
             </td>
    
    <td align="right">
        Records per page:
   <apex:selectList value="{! PageSize }" size="1">
    <apex:selectOption itemValue="5" itemLabel="5"/>
    <apex:selectOption itemValue="20" itemLabel="20"/>
    <apex:actionSupport event="onchange" reRender="contacts_list"/>
   </apex:selectList>
    </td>
</tr></table>

            <apex:column value="{! ct.FirstName }"/>
            <apex:column value="{! ct.LastName }"/>
            <apex:column value="{! ct.Email }"/>
            <apex:column value="{! ct.Account.Name }"/>
        </apex:pageBlockTable>
    
    </apex:pageBlock>
    </apex:form>
</apex:page>

Is ther any one else has experienced this or please help me to know if I missed something here!SF UI 45 ItemsVF Page 20 records
 
I have gotten all the way to Create a Trigger, and I get:

Couldn’t find the record named 'Nina Simone' with Email 'nsimone@test.com'. Please double check the instructions.

When I try to create the candidate, I get:

CreateContact: execution of AfterInsert caused by: System.QueryException: List has more than 1 row for assignment to SObject Class.CreateContactFromCan.createContact: line 5, column 1 Trigger.CreateContact: line 5, column 1   

 
Hello dear community, I was wondering how exactly to delete an apex class because obviously you can't do that in the production area, I already tried deleting it from my sandbox which worked but it didnt have any impact on my actual production area.
Thanks in advance