Salesforce Certified Platform Developer II — Question 108
Choose the correct definition for <apex:pageMessage>.
Answer options
- A. Standard Salesforce formatting, throws a specific message on a page
- B. Standard Salesforce formatting, shows all errors that occur on page. Can add more messages through the "ApexPages.addMessage" function
- C. A single message, without formatting, that can be associated with a specific component on the page
- D. No formatting; displays all errors on a page
Correct answer: A
Explanation
The correct answer is A because <apex:pageMessage> is designed to display specific messages using standard Salesforce formatting. Option B is incorrect as it describes the function of adding messages, which does not define <apex:pageMessage>. Option C misrepresents the formatting aspect, and option D does not accurately convey the purpose and formatting of <apex:pageMessage>.