Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam Certified Platform Developer II All Questions

View all questions & answers for the Certified Platform Developer II exam

Exam Certified Platform Developer II topic 1 question 98 discussion

Actual exam question from Salesforce's Certified Platform Developer II
Question #: 98
Topic #: 1
[All Certified Platform Developer II Questions]

A developer wants to create a Visualforce page that allows a user to search for a given account by Name. If the account is found, the account details should be populated on screen. If no account is found, an error message should be displayed to the user.
How can this be accomplished? (Choose two.)

  • A. Use the (apex: information) tag to display the error message
  • B. Use the ApexPages.addMessage() method to add the error message
  • C. Use the <apex:pageMessages> tag to display the error message
  • D. Use the account.addError() method to add the error message
Show Suggested Answer Hide Answer
Suggested Answer: BC 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
Sapphire808
1 year, 1 month ago
Selected Answer: BC
You can use apex:pageMessages with ApexPages.addMessage()
upvoted 2 times
...
lorenac2
1 year, 10 months ago
Selected Answer: BC
Not official, but explains it more clearly: https://www.sfdcpoint.com/salesforce/show-error-message-visualforce-page/
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...