How does the standardsetcontroller work in Visualforce?

How does the standardsetcontroller work in Visualforce?

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.

What causes a limitexception when instantiating standardsetcontroller?

Instantiating StandardSetController using a query locator returning more than 10,000 records causes a LimitException to be thrown. However, instantiating StandardSetController with a list of more than 10,000 records doesn’t throw an exception, and instead truncates the records to the limit.

What’s the maximum record limit for a standardsetcontroller?

This is useful for writing pages that perform mass updates (applying identical changes to fields within a collection of objects). Fields that are required in other Salesforce objects will keep the same requiredness when used by the prototype object. The maximum record limit for StandardSetController is 10,000 records.

How to access listview in apex using standardsetcontroller?

How to access ListView in Apex | Using StandardSetController for Pagination There are scenario in project lifecycle where developer creates SOQL or Dynamic SOQL to return expected result. Also if requirement changes they go back and change existing code to reflect updated SOQL.

Where to find the recordsetvar attribute in Visualforce?

You can accomplish this with the “recordSetVar” attribute on your Visualforce page. (the recordSetVar) attribute indicates that the page uses a set-oriented standard controller. The value of the attribute indicates the name of the set of records passed to the page.

How to create a Visualforce page for multiple record creation?

Create a completely custom VF page to list out the contacts, and then perform the logic to create the child records on save. Create a custom visualforce button, add it to a related list on a detail page.