Questions tagged [aura-handler]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
40 views

I want to use Upsert operation in my handler class

I have One trigger and one handler to call my two batch insert and update batch class. when running the code I get an error(error:>> first error: UNABLE_TO_LOCK_ROW) when I do update and insert ...
1 vote
1 answer
432 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="...
0 votes
1 answer
184 views

Blank white window while calling aura component

Hello everyone I created my aura component and added it like a button. First I created an action in (Buttons, Links and Actions) section on object and then added it in (page layouts) ->(Salesforce ...
  • 3
0 votes
1 answer
4k views

Get field value of current record in Aura component

I have an auro component where I created an input field and I want its value to come from the AccountID field. The component is placed on related object detail page. <aura:component controller=&...
  • 21
0 votes
1 answer
771 views

Aura handler is calling his action twice

<aura:handler event="c:ResultApplicationEvent" action="{!c.onResultHandler}" /> This is an aura Handler. this is the only handler present in my project which is handling ...
0 votes
1 answer
84 views

i am trying to insert Contact details using lightning cpmponent but it showing error. here is my code

apex controller public class lightningContactSave { @auraEnabled public static string save(string firstName, string lastName, string email, string phone){ Contact con = new Contact(...
  • 23
0 votes
1 answer
382 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, ...
0 votes
0 answers
82 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 ...
9 votes
1 answer
7k views

Custom message in AuraHandledException: is it possible?

How about situations, when I haven't Exception (it's not try/catch), but I still need to send a custom error message to the toast? When I try to use throw new AuraHandledException('My custom msg here')...
0 votes
2 answers
362 views

Why I can't see my error msg from apex in lightning component?

What is wrong here? I see only Error on toast. let toastEvent = $A.get("e.force:showToast"); action.setCallback(this,function(a){ let state = a.getState(); if(state == "...
0 votes
0 answers
773 views

How to handle more than 50k records in lightning component

How can we handle more than 50k records without using any offset/pagination in lightning controller.We need to display more than 50k records in lightning component.Can any one has idea?
  • 35
0 votes
0 answers
1k views

Get Field Label dynamically with aura:changeValue in Lightning Component

My requirement is whenever a field is changed and is updated I need to get the field label and sent that in mail saying that the field is updated. Now by using <aura:valueChange> I was able to ...
  • 1,085
3 votes
1 answer
5k views

How to add listener for toast notifications?

I want to perform an action when a notification happens in my app. The toast event is raised by SFDC which means I do not have access to the calling code. I have tried adding a handler to the force:...
  • 3,866
3 votes
1 answer
2k views

AuraHandlerException - Exception handlers should preserve the original exception

We have SonarQube setup for our org to scan for code quality. One code issue I get when using AuraHandlerException is - When handling a caught exception, the original exception's message and stack ...
  • 4,671
0 votes
0 answers
445 views

Detecting Data Changes with Change Handlers

I am looking at this example in the Developer Guide, and I can't replicate this in my instance. What am I doing wrong? Here is a snippet. <!-- Lookup Attributes --> <aura:attribute name="...
  • 1,050
-2 votes
1 answer
3k views

How to cover the line throw new AuraHandledException in the last method on the AuxilioResidDetalhesAlterContratoCtrl to the test class?

How to cover the line if (minhaSolicitacao == null) { throw new AuraHandledException('Registro não encontrado'); in the last method on the AuxilioResidDetalhesAlterContratoCtrl to the ...
1 vote
1 answer
750 views

Lightning: Detecting attribute changes after initial value

My problem is related with the 'change' event on a component attribute. I only want to execute a code after this attribute is initialized by the parent component. For example: <!-- CHILD ...
2 votes
1 answer
2k 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
3 answers
1k views

$A.get("e.c:applicationEvent") always returns undefined

I have no idea what's going wrong, so I'll just paste all the code I've got and let you share in the madness. Basically I want to fire an application event that takes the value from a lightning:input ...
11 votes
1 answer
20k 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 ...
3 votes
0 answers
2k views

How do I get the old value of a select in Lightning?

I have an ui:inputSelect in a nested component, I want to know how to get the old value when you select another option. <ui:inputSelect aura:id="cboProducto" class="slds-select" ...
4 votes
1 answer
1k views

Aura Iteration not detecting change event

I have a test setup, but i am unable to get it working. I have lightning page which shows Names of few accounts as an inputText using aura:iteration. I need to detect any change made by user on these ...
5 votes
1 answer
5k views

How do I get the Lightning Component "destroy" system event to fire?

I have a fairly bog standard Lightning Component with markup like: <aura:component controller="MyController" implements="flexipage:availableForAllPageTypes,force:appHostable,force:hasRecordId,...
4 votes
1 answer
587 views

Detect source of value change in Lightning Component

I've have this handler <aura:handler name="change" value="{!v.foo}" action="{!c.baz}"/> Is there a way to know whether the value was modified from button click (via component.set(), etc) ...
  • 4,676