Salesforce Certified Platform Developer II — Question 15

A company recently deployed a Visualforce page with a custom controller that has a data grid of information about Opportunities in the org. Users report that they receive a `Maximum view state size limit` error message under certain conditions.
According to Visualforce best practice, which three actions should the developer take to reduce the view state? (Choose three.)

Answer options

Correct answer: B, D, E

Explanation

Using the final keyword for immutable variables (B) prevents unnecessary changes that could increase the view state size. Refining SOQL queries (D) to fetch only relevant data reduces the amount of data stored in the view state, and implementing filters and pagination (E) further limits data displayed, ensuring optimal performance. The other options do not directly address reducing view state size effectively.