nerdexam
Salesforce

CRT-450 · Question #5

A developer has a Visualforce page and custom controller to save Account records. The developer wants to display any validation rule violation to the user. How can the developer make sure that…

The correct answer is B. Include <apex:message> on the Visualforce page. See the full explanation below for the reasoning.

Question

A developer has a Visualforce page and custom controller to save Account records. The developer wants to display any validation rule violation to the user. How can the developer make sure that validation rule violations are displayed?

Options

  • AAdd cuatom controller attributes to display the message.
  • BInclude apex:message on the Visualforce page.
  • CUse a try/catch with a custom exception class.
  • DPerform the DML using the Database.upsert() method.

How the community answered

(39 responses)
  • A
    15% (6)
  • B
    74% (29)
  • C
    3% (1)
  • D
    8% (3)

Community Discussion

No community discussion yet for this question.

Full CRT-450 Practice