Certified Platform Developer II Exam QuestionsBrowse all questions from this exam

Certified Platform Developer II Exam - Question 39


A developer built a Component to be used at the front desk for quests to self-register upon arrival at a kiosk. The developer is now asked to create a Component for the Utility Tray to alert Users whenever a guest has arrived at the front desk.

What should be used?

Show Answer
Correct Answer: A

Application events are best suited for scenarios where different parts of the application need to communicate. In this case, when a guest self-registers at the kiosk, it is essential to notify users across the application about the guest's arrival. Application events allow for such communication by facilitating the broadcasting of events that any component within the application can listen to and handle. Component events, on the other hand, are more appropriate for parent-child communication within a single hierarchy of components and are not suitable for the broader communication needs described in this scenario.

Discussion

4 comments
Sign in to comment
MetaLojiqTeeOption: C
Jul 30, 2023

The two components must communicate using Component Events

pddumpsOption: A
Jan 9, 2024

To create a Component for the Utility Tray to alert Users whenever a guest has arrived at the front desk, the appropriate option would be: A. Application Event Explanation: Application events are suitable for scenarios where multiple components across the application need to communicate with each other. In this case, when a guest self-registers at the kiosk (front desk), an application event can be fired to notify the Utility Tray component. The Utility Tray component can then handle the event and display an alert to the users. Option C (Component Event) is used for communication between parent and child components, and it may not be the most suitable for this scenario where communication is needed across different parts of the application

moitamOption: C
Aug 23, 2023

You need to use a component event, which is a type of event that is fired from an instance of a component and can be handled by the component itself or by a parent component.

MarkusTOption: B
May 29, 2024

Weird question. Both application and component events only fire in the SAME browser. So, only that kiosk's components would be notified for both those events. But the problem should assume that other users are using other screens - desktop/ipad/mobile etc. and they need to be alerted about this new guest. Not just same browser, but different browser/salesforce app (mobile or whatever). I'd say the answer is B although it's not a full answer - another component should poll it from database and then show it to users. If there was answer for Message Channel/Platform Event, that'd be a better fit as it works from database level - not just at browser level.