0

My handler component (recordCreate.cmp) isn't recognizing an application event for some reason, and generating this error as a result: No EVENT named markup://c:newEngagement found : [markup://c:recordCreate].

I've confirmed that this org has no namespace. Can anybody spot why the component isn't recognizing the event? Any help is much appreciated.

newEngagement.evt

<aura:event type="APPLICATION" description="Fired when User clicks overriden New Engagement button">
    <aura:attribute name="message" type="String"/>
</aura:event>

Firing Component & Controller (EngagementCreateOverride.cmp)

<aura:component implements="lightning:actionOverride,flexipage:availableForRecordHome" access="global">
    <aura:registerEvent name="newOppty" type="c:newEngagement"/>
    <aura:handler name="init" value="{!this}" action="{!c.doInit}"/>
</aura:component>

({
    doInit : function(component, event, helper) {

        var createEngagementEvent = $A.get("e.c:newEngagement");
        createEngagementEvent.setParams({"message" : "some sample message"});
        createEngagementEvent.fire();
    }
})

Handler Component (recordCreate.cmp)

<aura:component implements="lightning:actionOverride,flexipage:availableForRecordHome,force:hasRecordId" access="global">
    <aura:handler event="c:newEngagement" action="{!c.handleNewEngagement}"/>
    <aura:attribute name="recordId" type="String"/>
</aura:component>
1
  • This was a package.xml issue, hadn't named the event to be deployed. Feb 11, 2019 at 21:48

1 Answer 1

0

Package.xml hadn't been revised to include newly created Event - once I included it in package.xml everything worked.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .