Sunday 6 September 2015

Override SObject list view with Visualforce page


Create a visualforce page with standard controller and recordSetVar attribute of <apex:page>

Based on your Sobject change the StandardCopntroller and recordsetvar value.


<apex:page recordsetvar="Accounts" standardcontroller="account" tabstyle="account">
  <apex:enhancedlist customizable="True" height="600" id="YourListViewId" rowsperpage="10" type="Account">
  </apex:enhancedlist>
</apex:page>


Once visualforce page is created.
Goto Sobject detail page and goto Buttons, Links, and Actions section.
Now click edit next to list now you can see like below image


Now check radio button next to Visualforce page and select your visualforce page.
final save the changes.

Now your Sobject list view is overridden.





No comments:

Post a Comment