- February 12, 2020 at 2:38 pm #69342February 12, 2020 at 3:24 pm #69350Deepak #6
Salesforce Lightning Events are broadly classified into four:
2.Lightning Application Events from library
System events are fired automatically by lightning framework and during component initialization, rendering or attribute value change etc.
LIGHTNING APPLICATION EVENTS FROM LIBRARY
These events are provided by Salesforce Library that can be often used based on your requirement. However, some of these library events might not be supported in Salesforce app and Lightning Experience or a standalone app all at the same time. So it is recommended to instantiate the event using $A.get() to determine from where your component is running i.e Salesforce app and Lightning Experience or a standalone app.
Application Events helps in passing values between two independent events (without parent child relationship). It behaves just like a broadcast message wherein any device that has the receiver turned on can receive the broadcast message sent from a single device.
Component Events are required in order to pass values from child component to parent. Parent component (receiver) will be handling the event fired by the child components (sender).
Hope it helps!February 13, 2020 at 6:02 am #69377Arun Pal #14
There are 2 types of events in Salesforce:-
A component event is an event that is fired by a lightning component. A component event can either be handled by the component itself or it can be handled by any other component which is present in the hierarchy that receives the event.
An application event is generally like a broadcast message. Like if you send a broadcast, then all the receivers that are configured to accept that broadcast message receive that message. Similarly, an application event is fired by a component and all the other components that have the handler defined to receive that event are notified when the event is fired. Application Events are not bound by any hierarchy or relationship.
Please Register to reply to this topic. /