Follow these steps to enable list view export functionality for any Salesforce object.
First, you need to create a Visualforce page for your object. This page will serve as the container for the list view export functionality.
ListViewExport_[ObjectName]
. For Example:
ListViewExport_Account
<apex:page standardController="[objectApiName]" extensions="listviewexport.ListViewExportController"
recordSetVar="records" showHeader="false" sidebar="false">
<listviewexport:ListViewExport objectName="[objectApiName]" listViewId="{!listViewId}" />
</apex:page>
<apex:page standardController="Account" extensions="listviewexport.ListViewExportController"
recordSetVar="records" showHeader="false" sidebar="false">
<listviewexport:ListViewExport objectName="Account" listViewId="{!listViewId}" />
</apex:page>
After creating the Visualforce page, you need to assign it to the "List View Export" permission set to grant access to users.
Create a custom list view button that will trigger the export functionality.
Finally, add the newly created button to your object's list view button layout.