Thursday, 4 May 2017

Display case list view case using standard controller

1. Display the custom list view of case object using visualforce page and standard controller.

Visualforce Page:

<apex:page standardController="Case" recordSetVar="cases" sidebar="false">
    <apex:pageBlock>
        <apex:pageBlockTable value="{!cases}" var="c">
            <apex:column width="20px">
                <apex:facet name="header">Case Number</apex:facet>
                <apex:outputText value="{!c.CaseNumber}"/>
            </apex:column>
            <apex:column width="20px">
                <apex:facet name="header">Account Name</apex:facet>
                <apex:outputText value="{!c.Account.Name}"/>
            </apex:column>
            <apex:column width="20px">
                <apex:facet name="header">Contact Name</apex:facet>
                <apex:outputText value="{!c.Contact.Name}"/>
            </apex:column>
        </apex:pageBlockTable>
    </apex:pageBlock>

</apex:page>


2. Display the custom enhanced list view of case object data.






Visualforce Page:


<apex:page standardController="Case" recordSetVar="cases" sidebar="false">
    <apex:enhancedList type="Case" height="300" rowsPerPage="10" id="YourListViewId" />
</apex:page>




1 comment:

If you have any doubts, please let me know.