Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Salesforce Exam Platform Developer II Topic 8 Question 91 Discussion

Actual exam question for Salesforce's Platform Developer II exam
Question #: 91
Topic #: 8
[All Platform Developer II Questions]

A developer created a Lightning web component that uses a lightning-record-edit-form to collect information about Leads. Users complain that they only see one error message at a time about their input when trying to save a Lead record.

What is the recommended approach to perform validations on more than one field, and display multiple error messages simultaneously with minimal JavaScript intervention?

Show Suggested Answer Hide Answer
Suggested Answer: D

Contribute your Thoughts:

Lezlie
3 days ago
Apex trigger? Really? That's overkill for this use case. Validation rules all the way, easy peasy!
upvoted 0 times
...
Tarra
10 days ago
Oh man, I was about to suggest the try/catch/finally block, but that's way too much manual code. Validation rules for the win!
upvoted 0 times
...
Goldie
12 days ago
I was thinking about using an external JavaScript library, but validation rules seem like a simpler and more native solution. Gotta love that declarative approach!
upvoted 0 times
Jin
16 hours ago
Validation rules are definitely the way to go for displaying multiple error messages at once. It's a native solution that keeps things simple.
upvoted 0 times
...
...
Mitzie
16 days ago
I think using a Try/catch/finally block could also work, but it would require more JavaScript coding and may not be as efficient as using validation rules.
upvoted 0 times
...
Susana
18 days ago
I agree with Cherry. Validation rules are declarative and easy to set up, making it efficient to display multiple error messages without much JavaScript coding.
upvoted 0 times
...
Katlyn
20 days ago
Hmm, option C sounds like the way to go. Validation rules can handle multiple field validations without the need for JavaScript. Minimal code and no external libraries, just clean Salesforce configuration.
upvoted 0 times
Arlean
7 days ago
User1: I agree, option C with validation rules seems like the best choice.
upvoted 0 times
...
...
Cherry
23 days ago
C) Validation rules would be the best approach. They can be set up in Salesforce to validate multiple fields at once and display all error messages.
upvoted 0 times
...

Save Cancel
az-700  pass4success  az-104  200-301  200-201  cissp  350-401  350-201  350-501  350-601  350-801  350-901  az-720  az-305  pl-300  

Warning: Cannot modify header information - headers already sent by (output started at /pass.php:70) in /pass.php on line 77