What is StandardSetController and why is it used in Salesforce? Why do we instantiate it? Is there any alternative to this?

  • Happy, assuming you have already gone through the documentation .. what was not clear to you ? (if not, you may want to ask where to find the documentation :-) ) – Samuel De Rycke Aug 19 '15 at 12:13

-What? : StandardSetController objects allow you to create list controllers similar to, or as extensions of, the pre-built Visualforce list controllers provided by Salesforce.

-Why?: The StandardSetController class also contains a prototype object. This is a single sObject contained within the Visualforce StandardSetController class. If the prototype object's fields are set, those values are used during the save action, meaning that the values are applied to every record in the set controller's collection. This is useful for writing pages that perform mass updates (applying identical changes to fields within a collection of objects).

-More : https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/apex_pages_standardsetcontroller.htm

  • This is the same matter as the salesforce provided in their documentation. Can you elaborate with some example, where it is needed and where things can't work out without it? – happy Aug 19 '15 at 10:47

StandardSetController objects allow you to create list controllers.

This is useful for writing pages that perform mass updates.

Go through this link for more clarification

StandardSetController Class

StandardSetController Constructors

StandardSetController Methods

I hope this will leave you with more knowledge on Standard set Controller.

Give kudos if it helps you.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.