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

0
votes
1answer
241 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
1k 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
162 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
113 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
226 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
210 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
37 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
108 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
29 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
441 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
15 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
97 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
71 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
83 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
265 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
692 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}"/&...
4
votes
2answers
473 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
134 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
117 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
1answer
174 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
277 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
140 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
56 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
1k 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
76 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
264 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
248 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
1k 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
58 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 ...
0
votes
2answers
161 views

Component - event fired and handled in same component

What is the use of component event which we fire and handle in the same component? I mean what is the specific use case for it...like apart from our regular controller actions...
0
votes
2answers
209 views

Updating Child components that are siblings in iteration

So I have a parent component that is using an iteration of child components. When I change something on one Child component I would like it to change something on another Child component in the ...
1
vote
0answers
157 views

Detecting attribute update in sibling Lightning component when passed as reference

I have a parent component which has an object attribute called "record". This is passed into two instances of another component as a reference. In child component #1 one of the fields is changed on ...
17
votes
4answers
573 views

Why EXACTLY not calling Aura.Action attribute from Lightning Controller using $A.enqueueAction()?

Since the event registration/subscription feels like a long roundtrip for simple things, I found a "hack" for implementing a simple onchange handler in my own Lightning Components in form of an Aura....
1
vote
2answers
55 views

Rerender linghtning opportunity detail section from embeded VF page

I am seeking to rerender opportunity detail section from embedded visualforce page. based on click of button lightning detail section should be refresh. getting error : $A is undefined <script&...
1
vote
0answers
337 views

On Change event is not firing after first change in lightning:select

I used lightning:select like this: <lightning:select label="op:" aura:id="opid" name="fop" onchange="{!c.onchangeev}" disabled="{!v.dis}" required="true"> ...
0
votes
1answer
952 views

boatselected event handler

I am on step 6 (Display Boat Details) of lightning component framework specialist superbadge, and created a boatselected event. I am firing the event from BoatTile component and receiving it in the ...
1
vote
2answers
256 views

Lightning Components and propagation to children

I'm building/modifying a tool using lightning components which houses (dynamically-created) input components in a larger wrapper component. Currently, the inputs correctly send events to the wrapper (...
2
votes
2answers
44 views

One of two attributes is required in a lightning component

How could I enforce that one of two attributes is required in a lightning component? For example: <aura:event type="COMPONENT" description="UpdateRPGFlowGraphEvent"> <aura:attribute ...
7
votes
1answer
121 views

Can we use the event's attribute “path” in Lightning?

I've been working on a pretty complicated component, and I've had all kinds of trouble simply trying to identify which element is currently being used. After all sorts of experiments, I found a really ...
7
votes
2answers
2k views

Reload after “e.force:editRecord”?

I have a Lightning Component that displays a lightning:dataTable of custom object records. Displayed fields include Name, Amount, and Date. I need the fields to be editable, but dataTable's inline ...
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
2answers
281 views

Salesforce Lightning: How to save attribute values of a child component in a parent component when a button on the parent component is clicked?

I have a parent component which iterates over a child component and has a save button. Parent.cmp: <aura:attribute name="casAgentList" type="Availability_Of_CAS_OneMDCS__c[]"/> ... <...
4
votes
2answers
753 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
20 views

Broadcast event when scripts were loaded in lightning down the hierarchy

If I want to broadcast event when scripts were loaded in lightning down the hierarchy what should I do? Should I use the APPLICATION type event or are there other ways to do that? For example, here ...
2
votes
1answer
78 views

Lightning out event override failing in Summer '18 (except in debug mode…?)

I built a lightning component to be used in a Visualforce page using Lightning Out, which works fine in my development environment, which is in Spring '18. However, when I pushed it to another ...
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
368 views

eventlistener not working on VisualForce page

I have a VisualForce page as below: VFPage1: (https://ap5.visual.force.com/apex/VFPage1) <apex:page controller="Sampleclasscontroller" > <apex:pageBlock title="Hello {!$User.FirstName}!">...
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
328 views

Pass related record Id to custom component in lightning record page [closed]

I have configured a record page (say for Contact) in lightning app builder. On the left panel, I am showing a related list of certain records under a tab. On the right panel, I have a custom component....
1
vote
2answers
107 views

How to get lightning component iteration variable with lockerservice

I have a lightning component that looks like this: <aura:iteration items="{!v.categories}" var="category"> <li data-category-id="{!v.category.Id}"> <ui:inputCheckbox change="...