+ Start a Discussion
Erik John PErik John P 

Visualforce page to show default list view

Hello all!
I am attempting to switch the default opportunity list view in Lightning from "recent" to "my open opportunities".  I have created a VF page, and adjusted the tab to show the VF page instead of the default.  I think I'm almost there, but 2 issues.
1.  The page displayed is classic with a lightning header.  I would like it to be displayed as a lightning page.
2.  The displayed list is not "my open opportunities".
my VF page code is as follows:
<apex:page showHeader="true" tabstyle="Opportunity">
<apex:ListViews type="Opportunity" />
</apex:page>

any assistance on this is appreciated.
Best Answer chosen by Erik John P
GarryPGarryP
you might have to re-write the page with 
1. Lightning design system and use the classes mentioned their to get the UI similar to what you wanted 
2. Add the custom logic to display the open opportunity in the VF page 

Option 2 

1. use the ENHANCEDLIST tag instead listview. LISTID is the ID of the listView that you want to display. Open the listview and chckout the URL. You should see some ID which is the listID example- 
<pre>
  <apex:enhancedList type="Lead" height="300" rowsPerPage="25"
        ListId="00B90000003E2Yq" customizable="False" /></apex:page>
        </pre>
        
        let me know if you face any challenges. In this case if you do not see the Ligthing theme, you can always add classes from LDS to get the required look and feel.
 

All Answers

GarryPGarryP
you might have to re-write the page with 
1. Lightning design system and use the classes mentioned their to get the UI similar to what you wanted 
2. Add the custom logic to display the open opportunity in the VF page 

Option 2 

1. use the ENHANCEDLIST tag instead listview. LISTID is the ID of the listView that you want to display. Open the listview and chckout the URL. You should see some ID which is the listID example- 
<pre>
  <apex:enhancedList type="Lead" height="300" rowsPerPage="25"
        ListId="00B90000003E2Yq" customizable="False" /></apex:page>
        </pre>
        
        let me know if you face any challenges. In this case if you do not see the Ligthing theme, you can always add classes from LDS to get the required look and feel.
 
This was selected as the best answer
Navin SoniNavin Soni
Hi Erik,

You can use Enhanced List for show Different type of list View.

<apex:page>
    <apex:enhancedList type="Lead" height="300" rowsPerPage="25" id="LeadList" customizable="False" />
</apex:page>

Thank You,
Navin Soni
Erik John PErik John P
thank you all for your help!
sfdc ghousesfdc ghouse
ITS WORKING FINE THANK YOU SOOOO MUCH