In this blog we are going to learn about how to show contact view list in visualforce page. To show the contact view list we only use standard controller Contact in our visualforce page. Let’s see an example.


Create a visualforce page.

1). Goto>>Setup>>Develop>>Visualforce Page.

2). Create New.

3). Write following code to show the contact view list

<apex:page standardController="Contact" recordSetvar="Cont" >
    * Webkul Software.
    * @category  Webkul
    * @author    Webkul
    * @copyright Copyright (c) 2010-2016 Webkul Software Private Limited (
    * @license
    <apex:Slds />
    <div class = "slds-scope">
        <apex:form >
            <apex:sectionHeader title="Contacts" subtitle="Home" help=""  />
            <apex:panelGrid columns="6">
                <apex:outputLabel value="View:"/>
                <apex:selectList value="{!filterId}" size="1" id="sel" >
                    <apex:actionSupport event="onchange" action="{!list}"/>
                    <apex:selectOptions value="{!listviewoptions}" />
                <apex:commandButton value="GO!" action="{!list}" />
                <apex:outputLink value="/ui/list/FilterEditPage?id=00B6F00000Al7Mj&retURL=%2F003&cancelURL=%2F003%2Fo">
                    <apex:outputtext value="Edit"/></apex:outputLink>|
                <apex:outputLink value="/ui/list/FilterEditPage?ui/list/FilterEditPage?ftype=c&retURL=%2F003&cancelURL=%2F003%2Fo">
                    <apex:outputtext value=" Create New View"/></apex:outputLink>
            <apex:pageBlock >
                <apex:panelGrid columns="2" width="50%">
                    <h1 class="head">Recent Contacts</h1>
                    <apex:commandButton value="New" action="/001/e"/>
                <apex:pageBlockTable value="{!cont}" var="item"  id="list">
                    <apex:column headerValue="Name">
                        <apex:outputLink value="/{!}">
                            <apex:outputText >{!}</apex:outputText>
                    <apex:column headerValue="Account Name">
                        <apex:outputLink value="/{!item.accountid}">
                            <apex:outputtext value="{!}"/>
                    <apex:column headerValue="Phone">
                        <apex:outputtext value="{!}"/>



#Contact’s View List



That’s all about how to show contact view list in visualforce page, still if you have any further query, feel free to contact us, we will be happy to help you

Leave A Reply

Please verify that you are not a robot.

Tell us about Your Company

How can we help you with your business?

    Message Sent!

    If you have more details or questions, you can reply to the received confirmation email.

    Back to Home