5

As I understand the general idea behind aura/lightning is to be able to have components which can interact with each other. However, Salesforce's documentation seems to be lacking any information about interacting with native components which are delivered in the lightning experience.

Has any of you been able to create a component, included in a custom lightning experience record page, which listens for events from native components on this page? I have tried a few events so far in this fashion, but to no avail:

<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes" access="global" >
    <aura:handler name="testEvent" event="force:save" action="{!c.handleSave}"/>
</aura:component>
0

1 Answer 1

1

I haven't managed to find the exact syntax documented anywhere, but from other similar event handlers, I think you want something like this syntax:

<aura:handler name="handleSave" event="force:recordSave" action="{!c.handleSave}" />

You may also want this too (I couldn't work out this this would be required or not - but you can add in testing and remove once it's all working:

<aura:dependency resource="markup://force:recordSave" type="EVENT" />
1
  • Tried all of these - to no avail at this point in time - guess I will try to go through their code at some point to figure out how to do it..
    – Koen Faro
    Commented Aug 10, 2016 at 14:40

You must log in to answer this question.

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