nerdexam
Salesforce

PDII · Question #183

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…

The correct answer is A. Use the transient keyword in the Apex controller for variables that do not maintain state D. Refine any SOQL queries to return only data relevant to the page E. Use filters and pagination to reduce the amount of data. See the full explanation below for the reasoning.

Question

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.)

Options

  • AUse the transient keyword in the Apex controller for variables that do not maintain state
  • BUse the final keyword in the controller for variables that will not change
  • CUse the private keyword in the controller for variables
  • DRefine any SOQL queries to return only data relevant to the page
  • EUse filters and pagination to reduce the amount of data

How the community answered

(37 responses)
  • A
    76% (28)
  • B
    8% (3)
  • C
    16% (6)

Community Discussion

No community discussion yet for this question.

Full PDII Practice