What should the developer use to ensure error messages are properly displayed?

Users report that a button on a custom Lightning Web Component is not working. However, there are no other details provided.

What should the developer use to ensure error messages are properly displayed?
A . Add the <apex:messages/> tag to the component.
B . Use the Database method with allOrNone set to false.
C . Add a Try/Catch block surrounding the DML statement.
D . Add JavaScript and HTML to display an error message.

Answer: C

Latest PDII Practice Questions with 280 Q&As

Updated Study Material | Instant Download | Detailed Answers and Explanations

Subscribe
Notify of
guest
1 Comment
Aditya
Aditya
4 years ago

D is the right answer