Preparing Practice Exam…
Please wait a moment while the system generates the exam questions, answers, and study session.
Please wait a moment while the system generates the exam questions, answers, and study session.
Question 40 of 83
Free Preview · 83 of 275 · questions 1–83 of 275 are free. Sign up free to sync your progress across devices.
Select one answer.
Written by other learners. Comments can disagree with the marked answer — check the official documentation when in doubt.
A is correct. The requirement is to notify users across different components (from the self-registration component at the front desk to the Utility Tray component for user alerts). In Lightning Aura Components, Application Events are the best approach for communication between loosely coupled components that are not in the same hierarchy such as parent-child components. C is not correct: Component Events only work within a parent-child component hierarchy. The Utility Tray is a standalone component and needs an event from the self-registration component to trigger it.
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.
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