Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [lightning-events]

Lightning Events are a way for markup component to communicate its changing state

1
vote
1answer
28 views

How to setup eventListener for a LWC component to receive messages from an embedded iFrame

I am having trouble setting up an eventListener for my LWC component to listen messages received from an embedded iFrame. I have a parent component where I have set the event listener in ...
0
votes
1answer
364 views

Sending Meeting invite in lightning

i have worked in Salesforce Classic for sending meeting invite thru EVENT calendar. But in lightning, I can only save meeting invite. how can i send same meeting invite to contacts on email in ...
1
vote
2answers
46 views

Lightning empApi subscribe and unsubscribe method in JS constroller

I have an component using lightning empAPi. In controller, I am using subscribe method and didn't using unsubscribe method. Is that required to use unsubscribe method in controller. IF required please ...
2
votes
0answers
20 views

wave:selectionChanged behaviour in Summer '19

I'm creating a lightning app that interacts with an Einstein dashboard. The idea is that when a user filters data in the dashboard, a search is performed in an external system using the filtered data. ...
5
votes
2answers
2k views

how to access the save button in a modal when implementing the force:lightningQuickAction

I am actually creating a component that will implement the force:lightningQuickAction so that my component open in a modal window from the action button.I would like to capture the event where the ...
0
votes
1answer
25 views

Aura Component don't catch event from another one

Lightning Event: tripEventer, attribute - trip, Trip__c Component Item: <aura:registerEvent name="openTripEvent" type="c:tripEventer"/> <lightning:button class="slds-align_absolute-...
0
votes
1answer
655 views

Handle event in different instances of the same component

I have a main component that creates different instances of a child component which all have inputs and checkboxes. What I want is that whenever I change the value in a picklist for a child component, ...
0
votes
1answer
28 views

Set lightning input in a child component based on parent component onChange event

I am implementing simple Contact create/edit form and I have problems with automatic setting of one field (consbp) based on an entry in different field (AccountID). The main component (contactCreate....
0
votes
1answer
23 views

How to detect list element data changes with “change” handlers?

Accordingly to the documentation, the special aura change handler can be used to detect when a value in one of the component's attributes changes. Everything is fine with attributes of type Boolean, ...
2
votes
1answer
34 views

event.detail is undefined in Lightning:recordEditForm submit event

I'm trying to get field values at Lightning:recordEditForm onSubmit() event.In the documentation example it shows below. my onSubmit event handler as below, I end up getting error, [event.detail ...
2
votes
1answer
3k views

Cannot read property 'config' of undefined

I get this error just randomly: Uncaught Error in $A.getCallback() [Cannot read property 'config' of undefined] Callback failed: apex://taskKanbanController/ACTION$getKanbanWrap Here's the relevant ...
0
votes
1answer
59 views

How to force width resizing of lightning:datatable?

I've structured a component in a way that either a lightning:datatable aura component or a lightning:dualistbox. The dual list box is used to set the columns attribute of the data table. The issue is ...
1
vote
1answer
34 views

Building Custom Related List Component

I created a reusable lightning component that will act as a related list component. I want to handle add/remove event when the user makes changes from Edit Page (Settings-> Edit Page). Example: I ...
0
votes
1answer
656 views

Lightning Event with multiple components as handlers?

We have created a lookup component that we are reusing throughout our lightning app. Because these lookups are under each other, I would like to have all other the drop downs be closed as soon as one ...
1
vote
1answer
77 views

Calling Application events in LWC [closed]

i would like to call an Application event in Lightning web component. Below link describes the same in AURA. https://developer.salesforce.com/docs/atlas.en-us.218.0.lightning.meta/lightning/...
10
votes
1answer
9k views

lightning:spinner solution that finally works (using custom events, not aura:waiting)

Lightning components without a working loading indicator are just not professional. Too bad that there is not code example out there that seems to work under real-world circumstances.Every blog out ...
0
votes
0answers
15 views

window.addEventListener firing Multiple times

I have a situation where I need to reDirect the lightning page to record detail page once BACK button in iFrame is clicked. So, Java team was sending a postMessage from the page which I am opening it ...
1
vote
1answer
25 views

Unable to see Attendee list on event object in lightning experience in Spring'19

As per the below link of salesforce release notes, we can now see the attendee list on the event object in the lightning experience without enabling setting up the lightning sync. Salesforce Release ...
0
votes
1answer
645 views

Lightning Components: Call init method of a child component from a parent component

I want to call the init method of a child LC from a parent LC. I tried to use aura:method, and call the init method from a parent method. ..... <aura:attribute name="userContact" ...
3
votes
3answers
1k views

Can we reload screen after Save from force:editRecord event?

I've a Custom Lightning Component displaying a List custom object records. On each data row, I've custom button to Edit the record. On Edit click, I've fired following event: var editRecordEvent = $...
0
votes
0answers
8 views

Firing an application event of package A from package B

I recently came up against a problem related to event communication between two managed packages. In my scenario, I am able to fire an application event from package A and handle it in package B. My ...
0
votes
1answer
17 views

Event fired when user redirects to home : exists?

Heyo all, I am working on a Lightning Community. I need to detect whenever the user goes to the main page (clicking page logo, home ling, whatever...). I tried the following events : <aura:...
0
votes
0answers
45 views

Stop lightning custom event after handling it

I have a custom lightning component that calls another one via event and retrieve specific data. Problem is that I can call my component many times and every time I enter this component again from ...
2
votes
1answer
825 views

How to handle an event in a child component that is fired from a dynamically created grandchild component?

I have a component that includes a child component. The child component has a button that fires showCustomModal on an overlayLibrary and the content is a dynamically created component. Component ...
1
vote
3answers
4k views

How to get Child Component value from Parent component in JS controller?

Child Component - SearchBarCmp.cmp <aura:component > <input type="text" class="form-control" onchange="{!c.searchKeyChange}" placeholder="Search" id="SearchKeyValue"/> <...
4
votes
2answers
764 views

force:recordData “recordUpdated”: Detect Trigger/Workflow Changes

I'm using Lightning Data Service in a component. It all works well. One item I've noted is that it does not seem to detect changes to fields which may have occurred via a trigger or workflow after a ...
0
votes
1answer
21 views

Reuse Deleted Aura Component Name

While doing a trailhead superbadge I created a component event named "FormSubmit". After the fact, I noticed that the specific phrasing on trailhead was "formsubmit" so I deleted the component event ...
1
vote
1answer
147 views

Lightning Web Components: How to handle events from grand child on the owner(eventParent) component

I have 3 Lightning web components, Parent ->Child -> Grand child all with just a lightning button inside it. eventParent: <template> <lightning-button variant="brand" label="Submitparent" ...
0
votes
0answers
15 views

Passing Data between two unrelated Lightning Components [duplicate]

Does anyone know how to pass values from one lightning component to another unrelated lightning component? There's no Parent-Child combination and these components or not in a containment hierarchy. ( ...
0
votes
3answers
1k views

Lightning:openFiles Fires but does nothing

I am trying to use some out of the box events within lightning components, but nothing seems to happen once they are fired. I have the same issue with pretty much any out-of-the-box event. Currently, ...
0
votes
0answers
13 views

The application event not working [duplicate]

I know what I am asking is a very basic example question. But I am trying to understand the application event using an example and it is not working. I tried to figure it out all by myself for a long ...
0
votes
1answer
446 views

getParam Not Working on Simple Application Event

I have a button which when pressed causes an application event to fire. Before it does this it sets a string value using setParam. The event is fired and handled successfully. However, when I try to ...
0
votes
3answers
2k views

How to refresh the browser page in a lightning component?

I have a lightning component which handles a event and performs subsequent dml operations. Once this is done, a toast message is displayed (success/ error etc.) I want to refresh the entire browser ...
0
votes
0answers
8 views

Lightning Calander

I am new to lightning, I want to make appointment system using standard lighting calendar, Is there anyway i can replace day in day view with staff name like we have in fullcalendarui. i'll share a ...
2
votes
1answer
148 views

Is it possible to fire an event from a LWC and handle in another LWC which is not in containment hierarchy?

Is it possible to fire an event from a lightning web component and handle in another lightning web component which is not in containment hierarchy? This is achievable in Aura component using ...
0
votes
1answer
38 views

lightning datatable populate on paste from clipboard

Is it currently possible access the clipboard conents from the onpaste event for the lightning datatable? If so how? If not then is there a work around? I want to copy an paste from Excel and ...
0
votes
0answers
177 views

Lightning Record Edit Form onsuccess not firing

Having issues getting the onSuccess Event to fire on my Lightning:recordEditForm. My submit button is outside of the Lightning:recordEditForm and that works perfectly but i'd like to have the ...
2
votes
2answers
5k views

How to call parent Lightning component's method in child component?

I want to create a Lightning component where i can define some custom actions which can be used by the component which is creating instance. It will be very similar to the onrowselection, onsort ...
0
votes
1answer
313 views

How to handle Lightning Web Component Event from Lightning Aura Component?

I am firing an event from my Lightning Web Component(LWC). Now I have to receive this event by a Aura Component. As per the documentation I am able to receive the event if this LWC is enclosed in the ...
1
vote
1answer
471 views

Lightning Web Component use Publish-Subscribe event in Community cloud

How can we use publish-subscriber event pattern in Community Cloud using lightining web component. I have drag-and-drop two Lightining Web Component(LWC) in a community page. On click on first ...
0
votes
0answers
69 views

Lightning aura event handler error

I am using a custom application event (ackRequest) that I use to validate all components in a page. This event is fired in the afterRender of the community layout component. The event is handled ...
0
votes
0answers
36 views

LEX console method issue - lightning:tabClosed

I am trying to utilise the lightning:tabClosed event within my LEX component on a Case. I want to be able to get the record ID for the tab that was closed, as I need to do some processing using that ...
0
votes
1answer
48 views

Dynamic DOM : firing event on click

I am dynamically creating some DOM elements inside my component's controller and adding them to the page. I need to set the onclick event on these elements to call another controller function that ...
1
vote
1answer
60 views

Can't handle an Application event in Lightning

I am trying to handle Application event in a listening component but it doesn't work for some reason. Please, help. I can't write in console log "here" in the end Application <aura:application ...
0
votes
1answer
31 views

Loop through html object collection [duplicate]

How can I access the html element div.card as shown below, the div returns as Proxy{} in lightning and I cannot manipulate the DOM. The div comes from the content in controller because it is in rich ...
0
votes
0answers
39 views

Firing an event from one component to another in Lightning

Appreciate some guidance. I have a component which has a checkbox component and a calendar component. I would like to fire an event when a checkbox is selected and render the 2nd component(calendar) ...
2
votes
1answer
2k views

The campingList JavaScript controller isn't calling 'saveItem'

The Trailhead challenge check is telling me the following: Challenge Not yet complete... here's what's wrong: The campingList JavaScript controller isn't calling 'saveItem' in the Apex class to ...
0
votes
1answer
32 views

Component Event doesn't seem to working! [duplicate]

I was testing passing data between two components using Component Events but something doesn't seem to be right. I am not able to get the value in the Handler component. Could someone let me know what ...
0
votes
0answers
27 views

Lightning Application event undefined in d3.js .on() handler

I'm trying to fire an Lightning Application event from a d3.js handler. Basically I'm doing following: let stageMenuSelection = stageMenuContainer.select(stageMenuSelector), ...
0
votes
0answers
36 views

Change Platform Event Notification on Click

We are using the platform events to deliver the custom lead notifications through apex class. Database.SaveResult result = Eventbus.publish(leads); When the user clicks on the notification message, ...