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 11 Question 67 Discussion

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

A company has a custom component that allows users to search for records of a

certain object type by invoking an Apex Controller that returns a list of results

based on the user's input. When the search is completed, a searchComplete event

is fired, with the results put in a results attribute of the event. The component is

designed to be used within other components and may appear on a single page

more than once.

What is the optimal code that should be added to fire the event when the search has completed?

A)

B)

C)

D)

Show Suggested Answer Hide Answer
Suggested Answer: C, D

Contribute your Thoughts:

Shawna
3 days ago
Wait, Option A? Really? Putting the event firing in the component's render method seems like a recipe for performance issues.
upvoted 0 times
...
Polly
6 days ago
Hmm, I'm leaning towards Option B. Firing the event in the component's helper seems like a good way to encapsulate the logic.
upvoted 0 times
...
Pearlie
8 days ago
I'm not sure, Option D seems like it might work too. Separating the event firing into its own method could make the code more modular and easier to maintain.
upvoted 0 times
...
Mari
10 days ago
Hmm, that's a good point. I'll reconsider my choice and look into Option C as well.
upvoted 0 times
...
Desmond
11 days ago
Option C looks the cleanest and most efficient to me. Firing the event directly in the controller seems like the best way to go.
upvoted 0 times
...
Deeanna
12 days ago
I disagree, I believe Option C is the best choice because it provides the most efficient solution.
upvoted 0 times
...
Mari
24 days ago
I think the optimal code to fire the event is Option A.
upvoted 0 times
...

Save Cancel