Questions tagged [lightning-events]
Lightning Events are a way for markup component to communicate its changing state
334 questions
0
votes
0
answers
22
views
How to tell if `IsRecurrence2` Series is still Active (Lightning Experience Event Series)
I need to determine if a IsRecurrence2 event series is still actively generating new events.
There is a special method to delete an Event and all future events, but as far as I can tell, there is ...
0
votes
0
answers
22
views
lwc event handler not able to take even params from child
I have a child component
BoatSearchForm.html and a parent component BoatSearch.html which embeds the child and listens to its "onsearch" event. While listening it tries to get the value of ...
1
vote
0
answers
91
views
Child component need to re render after value changes in parent component
I have 3 components. Grand Parent --> Parent --> Child.
When ever data changed in Child LWC I need to Re-render the Child LWC which is inside Parent LWC.
I have tried GET SET methods also. But ...
0
votes
1
answer
69
views
Is it possible to create a calendar in a Chatter group?
I was curious if anyone has ever been able to create a calendar in a Chatter group? I have looked online, but didn't find any information on this topic. I am trying to create a calendar in a Chatter ...
0
votes
1
answer
989
views
LWC Custom Event Issue
I have a LWC Component A(Child), Whose javascript is dispatching an event like this:
dispatchRefreshImageDetails(imageId)
{
//imageId contains Full Image URL as from content version object.
...
2
votes
1
answer
490
views
Return Entire Object from for:each Template in Lightning Web Component (LWC)
Is it possible to return an entire object (not just a single field) from a for:each Template in LWC?
Specifically, I'm not sure why I can't access the object in the same way I can a normal object in ...
0
votes
1
answer
447
views
Sending specific objects data from salesforce to third party on every create, update, delete
We are thinking to do reporting in snowflakes while the data creation will happen inside salesforce. To do that, we need to send data to snowflakes on record creation, update and delete.
I have gone ...
1
vote
1
answer
512
views
LWC - render component onclick event
I have a lightning button and I have an instance of js Date class.
When I click on a button I want it to to show me a date that was week before (subtract 7 days).
Here is my .html file:
<template&...
0
votes
0
answers
467
views
How to call renderedCallback() in HandleChange field input only once
I have LWC with search input, with every handleKeyChange click on input, renderedCallback() is called, but I need it to call only once.
Controller:
@track hasRendered = false;
@wire(getAcc, { ...
0
votes
1
answer
828
views
Handle Opportunity Stage change
Reuirement : To show the fields and their values BEFORE saving the opportunity ONLY when opportunity Stage is changed to 'closed WON'.
For this I'm trying to use the LWC along with lightning modal but ...
1
vote
1
answer
1k
views
LWC - before unload does not trigger when changing URL within Salesforce
I have a LWC where the user can edit some records, but those changes are not persisted to the database right away. Instead, I would like to warn the user when they are about close the browser tab or ...
1
vote
1
answer
135
views
Visualforce handler not invoked when event fired in aura component
I'm using an aura component in a visual force page.
Aura Component:
RichInputText.cmp
<aura:component>
<aura:attribute name="bodyVal" type="String" />
<!-- ...
0
votes
1
answer
100
views
Detecting the state of the alt/option key in a LWC Headless Quick Action
I'd like my LWC Headless Quick Action to behave differently when the alt/option key is held down. But the platform abstracts away the browser events and calls the invoke function with no additional ...
1
vote
0
answers
175
views
Something is wrong with my code. [LWC Lifecycle hook problem]
I am stuck and unable to figure out a way to get out of this problem.
I know I am doing something terribly wrong here.
I have two LWC Components -
Parent [a container with multiple values to select[...
0
votes
0
answers
99
views
Code inside apex method not running intermittently on button click Aura component
I'm having a parent and child Aura component. There is a button on the parent component that invokes a js action and it further calls a aura enabled apex method.
The issue is it is calling the apex ...
-1
votes
1
answer
275
views
Refresh LWC component on another lightning page
I have a LWC component on Account page, which displays a few fields from related opportunity. The requirement states that I need to update LWC on the account record page whenever a defined set of ...
-1
votes
1
answer
293
views
What are the events triggered by the standard Opportunity Sales Path?
I want to build some functionality that will notify the user once they click on any stage in the standard sales path on the opportunity layout but before record save. What are the events which I can ...
0
votes
2
answers
792
views
in LWC Create a text box on child and button on parent whenever click on that button get child value and reflect on parent?
childCompoLWC
<template>
<lightning-card>
Enter value:- <lightning-input type="text" value={strInput} onchange={handleChange}>
</lightning-input>
</...
0
votes
0
answers
166
views
Why shows this error in Aura lightning Events?
ChildCompo:-
<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,...
0
votes
2
answers
939
views
LWC Event to Catch internal Salesforce Navigation [duplicate]
My Question :
Are there any events which checks whether user navigates to which navigation menu right now ?
For Example :
When I am at Case Record Page and my LWC is placed there,
So If I switch to ...
1
vote
1
answer
467
views
LWC Local Server says Couldn't find the custom component when I pass attribute using Custom Event from child to Grandparent
Im trying to do a simple operation which is pass an attribute from child to grandparent in LWC using Custom Event where I set the Bubbles and composed attribute to true to pass it through the ...
-1
votes
1
answer
1k
views
You have a parent LWC Component A which has two child LWC components B and C. How would you communicate between B and C?
I was asked this question and answered as follows : I would fire a custom event from child B, I would catch the event in the handler of Parent A and retrieve the value in the handler from event.detail ...
0
votes
1
answer
450
views
Problem to show String list in Show toast event
Hello everybody I am working with a LWC form that gathers the information from the user and send it to an apex function that validates the data. If this data is incorrect it send the list of errors of ...
0
votes
0
answers
440
views
Lightning out App error in callback function in aura component created from vfp
I have a vfp as below called from a related list button which create an aura component:
$Lightning.use("c:LA03_SendFormToContact", function() {
$Lightning.createComponent(...
1
vote
1
answer
2k
views
Selected input value not reflecting in JS controller of LWC
I am trying to create LWC component with HTML markup as below. The selected input values are not reaching JS controller. Tried multiple ways but the value is showing as null. Below is the code. What I ...
2
votes
0
answers
229
views
How to send data from Aura Components to Google Tag Manager?
I'm trying to implement GTM in Experience builder. But I want to send the send some page details through datalayer to GTM. I couldn't find right documents & articles for that. Can Anyon help me ...
1
vote
1
answer
1k
views
LWC event listener in head markup
I'm an analyst working with a developper to receive some values from a LWC. We are trying to pass values through dispatch/listener, but the eventlistener is not triggered.
The end goal will be to some ...
0
votes
1
answer
720
views
Upload file in child and submit in Parent
I have lightning-input tag with type as file in Child component, and I am making use of this child component in Parent component which contains Submit button. So when the user clicks on submit , file ...
0
votes
1
answer
818
views
showing a list of results showed while user is writing something in search box
I'm trying to create a search box where the user write something, and while he do that a listbox with all the matching results appears (like in the figure below) (!! I'm asking only how to show the ...
1
vote
1
answer
3k
views
pass Id in onclick to js controller
I'm trying to write my own version of pills in LWC without using the base component. I want to be able to pass the item.Id once a pill is clicked, but I always get undefined.
HTML:
<template ...
1
vote
1
answer
2k
views
Handle LWC event in Visual force page
I have overridden Standard "convert Lead" button with a Visual force page. LWC component is inside Visual force page using Lightning out. When I click Cancel button in LWC component, I want ...
4
votes
2
answers
8k
views
Adding LWC in Record Page Layout Section
Aside from nesting inside a visualforce, is there any way to add a LWC between sections in a page layout? Please take in consideration these Components will call events like getRecord, ...
1
vote
0
answers
89
views
Is there an event created when the arrow buttons are clicked on a OOB Flow Screen Component?
In the below screenshot, is there an event created when the arrow buttons(in Red box) are clicked? We would like to customize service resource availability so we need to know if next week or previous ...
0
votes
1
answer
346
views
How to set recurring events IsReminder date and time using Apex
I am trying to create a recurring event which is a full day event and event will create every week and I want to set a reminder before 15 min of the event starts.
Below are the lines which I am using.
...
3
votes
1
answer
495
views
Is "error" a reserved CustomEvent type?
I am trying to dispatch errors up from a child component to its parent. However, when my code looks like the below, I get two errors.
Code:
dispatch(error) {
this.dispatchEvent(new CustomEvent(&...
1
vote
1
answer
1k
views
Refresh custom lightning component when another custom lightning component call refresh
I have two custom components added in flexipage. I want to refresh component A with latest data when a certain action is performed on component A
// cmp 1
<aura:component implements="...
1
vote
1
answer
2k
views
LWC event listeners not responding
I have an LWC child component that is dispatching a custom event as such:
console.log('bw: fire saveslotclick custom event');
//fireCustomEvent(this, 'saveslotclick', { slot: this....
2
votes
0
answers
925
views
Handling Google Analytics with User Consent Cookie in Communities
We are setting up a public community (LWR template) and want to use Google Analytics. As there is the Google Consent Mode (see good explanation here) and the new Lightning User Consent Cookie Module, ...
0
votes
1
answer
716
views
Show/Hide OOB SAVE button on LWC datatable on an event fire
I have a LWC component embed in column of LWC Datatable using custom data types. Now I want to show/Hide OOB datatable Save button on an event fire from embed LWC component.
sdGridCustomDatatableChild ...
0
votes
0
answers
2k
views
How onclick will work if the button on the parent lwc component and the lightning-record-edit-form is on the child lwc component?
I have tried to create LWC's for a record creation/ Update like below.
Parent LWC component,
<template>
<lightning-button variant="brand" label="Click Here" title="...
0
votes
1
answer
2k
views
How to pass Object type attribute value from child to parent in Aura?
On clicking of a button in child Component I'm passing the "Object and String" type attribute values from Child to Parent using the Component Event. The Problem here is I'm not able to ...
0
votes
0
answers
62
views
Can we call custom label in application event while setting the event attribute if yes then what will be the syntax. see my docNotSignedAtr
function(response){
//Bug-8928---Prod issue resolution start-Amit>08-02-2022
if(response == null){
console.log('null response from requestSignedDocument '+...
0
votes
1
answer
420
views
What is the correct way to pass parameters to Lightning JS controller from anchor <a>
I have anchor tag in the lightning component and trying to get the value on user click the hyperlink.
//cmp
<aura:iteration items="{!v.refDataList}" var="refData" indexVar="...
1
vote
2
answers
3k
views
Component is not refresh during 2nd attempt after clicking on new button
I have overridden Standard New button on lead object with Aura Component and this Aura calls LWC which contains record edit form to create new lead record.
I have 2 record types Record Type 1 & ...
0
votes
1
answer
2k
views
Event Dispatch is not working
I am updating a value for a record using lightning-record-edit-form update in the child component. After updating the record, I want to pass the updated record to the parent. It is not get passed when ...
0
votes
1
answer
2k
views
LWC Can Variables Be Reset & Further Events Fired After Returning From a Back-Button/PopState
I have a requirement where I need to update values in an LWC when returned from a back-button popstate.
E.G.
window.onpopstate = function(event) {
if(event && event.state) {
// ...
0
votes
1
answer
4k
views
Calling Aura Event in LWC
I have a simple Aura component which is registering a managed package event and then firing it.
I need to call this custom_app:LoadAppEvent from lwc component instead from an Aura component. is there ...
1
vote
2
answers
5k
views
LWC event.currentTarget.value is undefined in production but works in sandbox
I have the below code for creating a list of checkbox's to select multiple options to filter a datatable. The code works fine within the sandbox however once i moved the code to the production org the ...
1
vote
0
answers
407
views
Manually Trigger cellchange Event on Datatable
Is there a way to manually trigger the cellchange event on a datatable?
I'm using a custom datatable that allows a custom data type - a dropdown (combobox) - it's based on this custom datatable.
I ...
0
votes
1
answer
2k
views
LWC unable to call onclick function from input element
I am new to LWC and trying to translate an existing VF page into LWC. I am trying to call an onclick function (pretty simple) but the function is not firing. Can anyone help me troubleshoot why this ...