<< Prev Question Next Question >>

Question 28/84

A developer is working on a set of custom Aura components that can be Individually added to a home page.
One of the components, c:searchAccounts, allows users to search for an Account and then select a specific found Account. Once selected, the other components.
Should get other information related to the selected Account and display it Which event should the c: 2eazchRccounta component fire to make it known that an Account is selected?

Recent Comments (The most recent comments are at the top.)

Fa3il khayr - Nov 07, 2024

Answer is C :
In Aura, application events are used when you need to communicate information across multiple, independent components in the application. Since this scenario involves multiple components on the same page that are not directly related, an application event is ideal. When the c:searchAccounts component selects an Account, firing an application event allows all other components on the page to react to that selection and display relevant information without requiring them to be in a parent-child relationship.

Dan - Nov 29, 2023

Mauricio,yyds

Mauricio - Sep 18, 2023

Application events follow a publish/subscribe model, which means that a publisher component can send an event message to a channel, and one or more subscriber components can listen and react to the event message.

An application event is suitable for your scenario because:

- It can communicate from the c:searchAccounts component to any other component that provides a handler for the event, regardless of their position in the component hierarchy. This allows for communication between components that are not in direct contact, such as the components on the home page.
It can carry data and information from the c:searchAccounts component to the other components, such as the account id or name of the selected account1. This allows the other components to get other information related to the selected account and display it.

- It can leverage the existing security features of Salesforce, such as authentication, authorization, and encryption1.
The other options are not correct. A component event is a type of event message that can only be handled by components that are in direct contact with the component that fired the event, such as a parent or a child component. A publish event is a type of event message that is used in Lightning Web Components, not in Aura Components. A refreshView event is a type of system event that refreshes the view of an app or component after data changes.

Therefore, the correct answer to your question is:

An application event

https://salesforce.stackexchange.com/questions/137052/component-events-vs-application-events-component-getevent-vs-a-get...

LEAVE A REPLY

Your email address will not be published. Required fields are marked *

Question List (84q)
2 commentQuestion 1: A developer is writing a Jest for a Lightning web component ...
3 commentQuestion 2: An org has a Process Builder process on Opportunity that set...
Question 3: A developer Is asked to develop a new AppExthange applicatio...
1 commentQuestion 4: A developer sees test failures in the sandbox but not in pro...
1 commentQuestion 5: Universal containers needs to integrate with several externa...
Question 6: Global with sharing class MyRemoter { public String accountN...
1 commentQuestion 7: In an organization that has multi-currency enabled, a develo...
Question 8: A developer is developing a reusable Aura component that wil...
2 commentQuestion 9: Consider the following code snippet: How should &lt;c-order&...
3 commentQuestion 10: What is a benefit of JavaScript remoting over Visualforce Re...
Question 11: An Apex trigger creates a Contract record every time an Oppo...
1 commentQuestion 12: A company uses an external system to manage its custom accou...
Question 13: A company has a native iOS app for placing orders that needs...
Question 14: A developer wrote an Apex method that makes an HTTP callout ...
1 commentQuestion 15: Universal Containers (UC) wants to develop a customer commun...
Question 16: What should a developer use to query all Account fields for ...
Question 17: Account object has a field, Audit_Code__, that is used to sp...
Question 18: A Visualforce page loads slowly due to the large amount of d...
1 commentQuestion 19: As part of a custom interface, a developer team creates vari...
Question 20: Which statement is true regarding savepoints?...
Question 21: Which technique can run custom logic when a Lightning web co...
Question 22: Which use case can be performed only by using asynchronous A...
Question 23: A developer creates a Lightning web component to allow a Con...
2 commentQuestion 24: Consider the following code snippet: How should &lt;c-order&...
Question 25: Users report that a button on a custom Lightning Web Compone...
3 commentQuestion 26: A developer created a Lightning web component that uses a li...
1 commentQuestion 27: A developer is asked to create a Lightning web component tha...
3 commentQuestion 28: A developer is working on a set of custom Aura components th...
Question 29: Universal Containers uses Salesforce to manage its product o...
3 commentQuestion 30: A company manages information about their product offerings ...
Question 31: (Exhibit) The test method above tests an Apex trigger that t...
Question 32: A developer is asked to find a way to store secret data with...
Question 33: A developer created a Lightning web component that allows us...
Question 34: A developer is building a Lightning web component that displ...
Question 35: A business requires that every parent record must have a chi...
Question 36: Consider the following queries. For these queries, assume th...
1 commentQuestion 37: A software company uses a custom object Defect_c, to track d...
Question 38: A developer has requirement to query three fields (id, name,...
Question 39: Refer to the markup below: A Lightning web component display...
Question 40: A developer notices the execution of all the test methods in...
Question 41: (Exhibit) What should be added to the setup, in the location...
Question 42: A developer is writing code that requires making callouts to...
Question 43: (Exhibit) AWC wants the real-time inventory reduction for a ...
Question 44: Which three actions must be completed in a Lightning web com...
4 commentQuestion 45: What are three reasons that a developer should write Jest te...
1 commentQuestion 46: A developer created an Apex class that updates an Account ba...
Question 47: A Visualforce page loads slowly due to the large amount of d...
1 commentQuestion 48: Users upload .csv files in an external system to create acco...
Question 49: A developer has a test class that creates test data before m...
Question 50: Refer to the following code snippets: MyOpportunities.js (Ex...
Question 51: A company uses Opportunism to track sales to their customers...
3 commentQuestion 52: As part of a new integration, a developer is asked to implem...
Question 53: There are user complaints about slow render times of a custo...
Question 54: A company represents their customers as Accounts in Salesfor...
1 commentQuestion 55: Refer to the component code and requirements below: Requirem...
1 commentQuestion 56: Universal Containers implements a private sharing model for ...
Question 57: Refer to the Aura component below: Component markup: (Exhibi...
Question 58: A Page throws an Attempt to dereference a null object error ...
Question 59: Refer to the code snippet below: (Exhibit) When a Lightning ...
2 commentQuestion 60: A developer has working business logic code, but sees the fo...
Question 61: A developer is building a Lightning web component that retri...
Question 62: The following code segment is railed from a Trigger handler ...
1 commentQuestion 63: Consider the Apex class below that defines a RemoteAction us...
Question 64: A company uses Salesforce to sell products to customers. The...
Question 65: The Account object has a field, auais_Code__c, that is used ...
Question 66: Universal Containers (UC) has enabled the translation workbe...
3 commentQuestion 67: A business currently has a process to manually upload orders...
Question 68: After a Platform Event is defined in a Salesforce org, event...
Question 69: (Exhibit) The test method above tests an Apex trigger that t...
1 commentQuestion 70: A developer has created, Lightning web component that uses t...
Question 71: An org records customer order information In a custom object...
1 commentQuestion 72: A developer implemented a custom data table in a Lightning w...
Question 73: (Exhibit) Consider the above trigger intended to assign the ...
Question 74: Given a list of Opportunity records named opportunityList, w...
Question 75: A developer is asked to look into an issue where a scheduled...
Question 76: A large company uses Salesforce across several departments. ...
Question 77: Universal Containers allows customers to log into a Salesfor...
Question 78: Salesforce users consistently receive a "Maximum trigger dep...
Question 79: A developer has a Batch Apex process, Batch_Account_Sales, t...
Question 80: A developer is building a Lightning web component that searc...
1 commentQuestion 81: Refer to the code snippet below: (Exhibit) As part of an Int...
2 commentQuestion 82: Universal Containers needs to integrate with a Heroku servic...
Question 83: Universal Containers wants to use a Customer Community with ...
Question 84: A company wants to incorporate a third-party web service to ...