function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Anand@SAASAnand@SAAS 

List views and StandardSet/List Controller question

I want to create a visual force page that leverages an existing List view that the user might have created. I need to put custom buttons on the page along with the list view and have the custom buttons act on the records selected in the list view.

 

The code at http://www.salesforce.com/us/developer/docs/pages/Content/pages_controller_sosc_list_views.htm gets me there to an extent but I now have to write VF code to display the columns.

 

I don't want to create custom list view buttons as we don't want to display the buttons to all users. AFAIK we cannot customize the standard list view layouts by profile.

 

Are there any alternatives?

Best Answer chosen by Admin (Salesforce Developers) 
mtbclimbermtbclimber

You'll need to take over the list display if you want to conditionally present buttons which means you'll need to define the columns to present in your view. The standardsetcontroller allows you to leverage the filter definition from listviews with your defined columns. You can't get the columns dynamically today unfortunately.