Imagine a custom object called 'Foo' which is having the normal SFDC tab displaying the SFDC OOTB list view page. From this page, you can select, create, ... different views and return a list of matching records.

On the Tab List view page, I would like to add a custom button which deletes the records which are selected in the list view. Fairly easy using the StandardSetController and method getSelected().

The standard tab List View page has a 'Select All' checkbox selecting all the records on the current page from the list view. What I would like to do in my custom extension is capturing if the checkbox 'Select All' has been checked. If that checkbox has been marked, then capture all the records from the list view, not only the one's selected on the current page.


The button should delete the records:

  • Which are selected on the page(s)
  • Or all the records on all pages if checkbox 'Select All' has been checked

This would allow us to still configure, in the normal way, the list view.


Is this feasible without creating a custom VF page?


Generating a second button which calls an extension function using the next functionality from the StandardSetController, thus getting all the records in the filtered view

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.