Activity Forums Salesforce® Discussions When should component events and application events be used in Salesforce?

  • When should component events and application events be used in Salesforce?

    Posted by Aditya on May 13, 2020 at 5:54 PM

    When should component events and application events be used in Salesforce?

    Kirandeep replied 6 years ago 3 Members · 2 Replies
  • 2 Replies
  • Anjali

    Member
    May 14, 2020 at 10:16 AM

    Component event usage is more localized as these can be used by same component or component in containment hierarchy. If you use application events then it may fire system events. Use Application events only if components are present in 2 different app or are not in containment hierarchy.

  • [adinserter block='9']
  • Kirandeep

    Member
    May 14, 2020 at 12:40 PM

    Component events: to talk to a parent using the capture and bubbling mechanism, like with DOM events. Usually, one component is interested by the event, like an event aggregator. Application events: to broadcast to other components and not exclusively ancestors.

Log In to reply.