Stack Exchange Network

Stack Exchange network consists of 174 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

0
votes
0answers
17 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" ...
0
votes
0answers
14 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
1answer
16 views

On change of designer attribute, init() handler is called again

We are using lightning components in a community. We drag drop the components into a template and configure through designer attributes. For one of such lightning component, there is an init() handler ...
0
votes
0answers
24 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, ...
1
vote
2answers
35 views

Undefined value from event

I am trying to get the value of (firstName, lastName, emailAddress, mobile) from the parent component and use it in my child component but when I set it into params and logged the values, I always got ...
0
votes
1answer
20 views

Application Event not recognized by handler component

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:...
0
votes
2answers
37 views

Lightning Event in Looping [closed]

I know it's a strange question to ask without context but what would be the implications if I have a lightning component firing an 'COMPONENT' type event every 1 second? I imagine it would be quite ...
0
votes
2answers
44 views

Lightning - Which element was Changed?

I have a table for create expenses. I need to identify each element that I select, in order to perform validations or actions for each one. I have tried: var rowId = event.currentTarget.id; It ...
1
vote
1answer
15 views

Passing mutiple attributes to Application type event and handling the event in multiple components

Here is what I am trying to do. I have components A, B, C all on the Home page and there is another component D which has few Aura:If blocks to display differnt blocks as needed. I am using a few ...
2
votes
1answer
42 views

How can you get the caret position when working from an event?

Looking at the Locker documentation they list selectionStart as being a valid attribute, but I can't find a way to access it. I am trying to write an input masking utility, and everything works fine ...
0
votes
1answer
19 views

Capture the same event in 2 lightning components

I have two different lighting components that launch an overlay with the same component inside it. The overlay provides the user a modal to select some options and upload a file using lightning:...
1
vote
0answers
40 views

Send data from Lightning component to visualforce page without window.postmessage

I am using window.postmessage() to send data from lightning component to visualforce page as given in below link. https://developer.salesforce.com/blogs/developer-relations/2017/01/lightning-...
0
votes
0answers
24 views

Lightning: Standard events are not firing in some Sandboxes

I have created a custom lightning component for users to create new Case from the Account related tab. However standard events such as "navigateToSObject", "navigateToObjectHome" are not firing after ...
1
vote
0answers
32 views

custom files related list component not reflecting new files upload

I have a custom lightning component that displays further details from the contentVersion. the customer requirement is to display both, the standard files related list and my custom cmp. now, when the ...
5
votes
1answer
107 views

Application Event fired by a child component doesn't flow down other child component

I have 1 main component (Parent.cmp) which includes 2 components (Brother1.cmp and Brother2.cmp). Brother1 fires an event which should cause an action in Brother2. Documentation says that we should ...
2
votes
1answer
34 views

how to use system events with namespace

Does anyone have an idea how to use lightning system events like showToast or navigateToSObject with namespace of managed package (let us say the namespace is xyz). var toastEvent = $A.get("e.force:...
1
vote
1answer
22 views

Where are events registered with aura:registerEvent documented in the component spec?

This is a seemingly simple question that maybe someone can help me with: the <aura:registerEvent /> tag has a "description" attribute. Based on the way other tags are documented (e.g. <aura:...
0
votes
1answer
64 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 ...
0
votes
1answer
125 views

Event is undefined in afterrender

I have a lightning component that I am adding a click event listener as part of the afterRender. The problem I have is that I want it to fire an event but the event is coming back as undefined. here ...
0
votes
1answer
109 views

'Trailhead Lightning Component Basics: Connect Component with Events' - controller isn't calling 'saveItem'

It works when I test it but I'm getting the following Trailhead error: The campingList JavaScript controller isn't calling 'saveItem' in the Apex class to save the record or setting the 'item' as a ...
1
vote
1answer
198 views

How to get parameter value from event?

I have the following codes: Event <aura:event access="global" type="COMPONENT" description="Event template" > <aura:attribute name="data" type="String"/> <aura:attribute name="sample"...
1
vote
3answers
56 views

Community: Securely pass attribute to different component on separate page

In my community I have an iteration that displays "Open" records from a custom object that shows an overview of their record. Below the overview is a button that currently goes to the standard ...
0
votes
2answers
79 views

isUrlAddressable causes component to no longer initialize after destroy

I have a set of components that run inside a custom tab. This does not have an 'Application' root, just rather a component that holds several other components. Everything works great here. The ...
0
votes
2answers
82 views

Uncheck child component checkboxes from parent button

How can I reach this behavior? My component is structured like this: <aura:component> <button onclick="{!c.clearCheckbox}" /> <aura:iteration items="{v.items} var="i"> ...
1
vote
1answer
121 views

Refresh record detail page and close the a lightning out visualforce from lightning component button [closed]

I have a lex component that runs from a lightning-out visualforce page that opens from a custom button on a record details page. How can I close the visualforce page and refresh the record details ...
0
votes
1answer
32 views

loop through components looking for data in it

im building a list that people select only a single item which works in a limited capacity but reloading or re-selecting isnt very user friendly. the basic concept is a controller retrieves selections,...
0
votes
1answer
40 views

Event not being handled in lightning component

Hello I am trying to handle an event in my lightning component between 2 items being dragged and dropped onto another. My event seems to be firing, however it is not being handled as the function ...
1
vote
0answers
24 views

Lightning Data Service Interaction with Page Edit giving error

I have created a Lightning component to display nearBy accounts using Geolocation for a given Account. I am able to display a list of locations passing BillingLatitide and BillingLongitude from the ...
0
votes
1answer
192 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
2answers
14 views

Event on adding a related object

So this below is the standard modal for adding a team member: I'm almost sure that when you click "Save" an event is fired and you can catch that event and handle it. The point is I can't find the ...
1
vote
1answer
44 views

Lightning Application Event Seems to Refuse to Fire

Event: <aura:event type="APPLICATION" description="Event is fired when boat type is changed in the BoatSearchForm component" > <aura:attribute name="boatTypeId" type="String"...
0
votes
1answer
37 views

Can I save and fire lightning event later?

I am trying to fire the same lightning event from one component more than once. Is it possible to save the event in a variable and use it to fire? I saw this question. It did not help.
0
votes
2answers
58 views

How to use HasRecordID in JS Controller

I am trying to use the below function and I have implemented hasRecordId at the component level. handleClick: function (component, event, helper) { var navEvt = $A.get("e.force:...
0
votes
1answer
134 views

Salesforce Lightning Event's attribute showing undefined

I am Doing Lightning Super Badge,but stuck atone place. Following is the code snippet. BoatTile.cmp <lightning:button class ="{!v.selected=='true' ? 'tile selected':'tile'}" ...
4
votes
1answer
465 views

Are lightning event synchronous or asynchronous?

Are lightning event synchronous or asynchronous? component1: <aura:component> <aura:handler name="event1" event="zced:TypeDoesNotMatter" action="{!c.event1Function}"/&...
0
votes
0answers
34 views

Application Event information is not propagating to next component

I am trying to Application event to propagate information of one component to another. I have few components. Below is sample Code: I can access Account Event values in Payment Controller, But i am ...
4
votes
2answers
289 views

Dynamically Adding Event Handler within CreateComponents

UPDATE: Resolved by updating the Lightning Component Bundles being created to API version 43.0 ALSO: For future reference, the 8th line of the second code block (var el = els[i];) should instead be ...
0
votes
1answer
57 views

What event fire when you attach a file/attachment on the record page?

I've created a lightning component that shows a table of all contentversions related to the record detail page you are on. However, if upload/add a new file using the "Files" related list, it doesn't ...
3
votes
0answers
89 views

Is there any way to know when the standard cancel button is clicked in lightning after calling e.force:editRecord

I want to do some modification when standard cancel button is clicked in lightning..Is there any event or any other way to get that?
0
votes
0answers
23 views

Listen to immediate change in input of ui:inputText Lightning component while Input element in disabled

How can i call javascript controller method onChange of the value in ui:inputtext Disabled. what are the values need to be used in ui:inputtext attributes
0
votes
1answer
76 views

Event and EventRealtion

I am trying to create an event and upon creation of Event i am creating EventRelation to add attendee. While creating Event i am prepopulation some fields in before insert. If i am prepopulation Type ...
0
votes
2answers
153 views

lightning event fired or not

Can we check whether a lightning event of type COMPONENT was fired or not. I have an event which is handled in parent component with 3 attributes. Say Ocr,CI,CD.. Now what is happening is these ...
2
votes
1answer
91 views

How to use force:editRecord from visual force page

force:editRecord event works fine in my lightning app, but the same does not work in the visual force page. I am aware that force:editRecord is handled by one app container but I am looking for work ...
4
votes
0answers
50 views

How can I manage lightning components' navigation-related caching

This is related to this question: Navigation in Desktop Lightning Experience not Destroying Components My components are listening to the force:refreshView event, but since the components are cached ...
6
votes
1answer
603 views

Lightning:recordForm cancel button unresponsive

I'm building out some community features and one of them is like a related list with a new button. When the user presses the new button, I am launching a modal window with another custom component ...
1
vote
1answer
50 views

Lightning Component with Application Event - Multiple Instances Being Updated

I think I have a grasp on the difference of COMPONENT and APPLICATION level events, and how to use them - however, I am running into a situation I cant get around. Lightning App configured Lightning ...
0
votes
1answer
173 views

Populate combobox from init function

So I got a great autocomplete combobox example from here http://sfdcmonkey.com/2017/07/17/re-usable-custom-lookup/ and it works great. The autocomplete combobox composed two components one is the ...
1
vote
1answer
142 views

$A.get('e.force:refreshView').fire(); for Save funtionality is not working in case of Lightning:dataTable

I want to refresh the view whenever I click on Save button, it should update datatable with newly updated values, but still shows old value. Though update works fine in back-end. Please find code ...
0
votes
3answers
767 views

Force a lightning tab to load without clicking it

I need to load a lightning tab with in a lightning tab set without having to click on the tab itself. The reason for this is so I can send an event to the child component (inside the tab) without the ...
0
votes
1answer
35 views

Salesforce global popup based on user

I know this is a loaded question but i'm curious if anyone can point me in the right direction. The ultimate goal is to try and create a task for inbound/outbound calls, and if salesforce is open, pop ...