1

I have a Visualforce page which loads a Lightning Aura Component using LightningOut

In my Aura Component, I'm firing one Application event which will be handled by VF Page. Now when I fire Application Event, I get the error, I'm firing my event like this:

 $A.get('e.c.CloseConsoleTab').fire();

I have also added the below dependency in my lightning out application, which is mentioned here. But still I'm getting the error.

<aura:dependency resource="markup://force:*" type="EVENT"/>
sfdc
  • 321
  • 7
  • 24

1 Answers1

1

It's e.c:CloseConsoleTab, not e.c.CloseConsoleTab. Also, check the event name, as they are cAsE-sEnSiTiVe. Also, if you mean force:closeConsoleTab, you're using the wrong namespace (this event does not appear to exist?), otherwise if you mean to use your own namespaced event, you're importing the wrong dependencies in your markup:

<aura:resource type="event" resource="markup://c:CloseConsoleTab" />
sfdcfox
  • 489,769
  • 21
  • 458
  • 806