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 [aura]

Aura is an open source UI component framework for developing dynamic web apps for mobile and desktop devices. Aura provides a scalable long-lived lifecycle to support building apps engineered for growth. Aura supports partitioned multi-tier component development that bridges the client and server. It uses JavaScript on the client side and Java on the server side. Aura is the underlying technology behind Lightning Components in Force.com.

0
votes
1answer
18 views

AuraEnabled returning success records instead of failed records

I have apex AuraEnabled function which is inserting records for a junction object, however due to some validation rules, some of the records may get failed. So I have a solution to maintain a list of ...
0
votes
2answers
27 views

Problem setting value of text in lightning component from js helper

So I created for te first time a lightning component and I'm just getting familiar with it all. What I did was create the apex controller, the lightning component, the js contoller and the js helper. ...
0
votes
1answer
53 views

Custom Script Eval error on lightning application initial load

So I'm working on a legacy file at my new job and I'm getting this error: Custom Script Eval error in the resource loaded using 'ltng:require' [[object Event]] when a custom aura application is ...
0
votes
0answers
10 views

How to navigate cursor from one component to another in record detail page?

I have 2 components added in detail page of record(One is at the top and another is at somewhere middle). On click of a link in first component I have to navigate(auto scroll) to the 2nd component ...
0
votes
1answer
17 views

Change input value using javascript

I have an input in a form built with aura: <input class=" input uiInput uiInputText uiInput--default uiInput--input" type="text" aria-describedby="5284:0" placeholder="" id="7:4790;a" data-aura-...
0
votes
1answer
15 views

lightning:buttonMenu value not coming in controller

I am using lightningmenu item in an aura iteration event.detail.menuItem.get("v.value"); Compoennt Code <lightning:buttonMenu iconName="utility:down" onselect="{!c.onButtonMenuSelect}" ...
2
votes
1answer
91 views

Implement a table using LWC

I would like to implement a table in Lightning Web Components, which would use standard library components and implement the desired outcome. This is listing of table.html file <template> &...
0
votes
1answer
70 views

To call apex method every time when attribute changed

I have 2 components: - parent is Aura component - child is LWC component child component surround with aura:if and rendered in particular case. I need to call Apex method every time when 'param' ...
0
votes
1answer
47 views

Display image in salesforce lightning component

I have a contentversion file which I am using the following tag to view in my lightning component <img src="/sfc/servlet.shepherd/version/download/0690w0000000IPS"/> However, it is downloading ...
0
votes
0answers
27 views

No Access .. field was removed from the entity or access to this field was removed e.force:createRecord

In my controller I populate a map with the record type id: ... String myrec = GetRecordType.getDefaultRecordTypeID('Waste_Assessment__c'); fields.put('...
0
votes
0answers
14 views

Geolocation not working on VF page in aura component

I have created a VF page that is used inside an iframe on my lightning component. The iframe has attribute allow="geolocation;". Geolocation doesn't work on it when I try to use either Esri map's ...
0
votes
1answer
45 views

Remove selected values from the multiselect picklist in lightning

I have a lightning component which is basically a filter having two buttons, Apply All and Clear All. I would like to remove the selected values on a button click "Clear All" The filter looks like ...
0
votes
0answers
25 views

open note dialog from lightning component

is there any way to pop open the standard notes dialog from a custom lightning component? to explain: all the salesforce standard components open notes in a dialog at the bottom right of the screen....
2
votes
1answer
79 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
2answers
36 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
1answer
17 views

How to change the value of disabled with aura:if?

I have a few text input fields and 1 lightning:input type="file": <lightning:input type="file" name="file" accept="image/jpg" id="photoFile" onchange="{!c.handleFile}" disabled="true"/> I have ...
1
vote
3answers
40 views

How can I get Id from @AuraEnabled method in simple method?

I have a Lightning cmp with some logic, and I need to get Id to continue work with it in Lightning. But I get null. How can I fix it? public static Id toolId; @AuraEnabled public static void ...
0
votes
0answers
45 views

Issue with Save function on tabChange and textchange

I’m facing an issue registering tabset’s ‘onselect’ and textArea’s ‘onblur’ event when doing a ‘save’ on them. Below is my situation I created a form using lightning component which consists of a ...
0
votes
1answer
123 views

AuraDefinitionBundle No APPLICATION named markup://

I'm facing yet another odd error when attempting to upload my managed package. It is throwing this AuraDefinitionBundle - InitialLinkingApp No APPLICATION named markup://[namespace_redacted]:...
0
votes
1answer
41 views

How to Identify the clicked Div element

I have multiple div element in my lightning component which are clickable and from all of them I'm calling the same controller method. I want to know the div name which is clicked in my component. I ...
2
votes
1answer
235 views

Navigate to Standard New Record page with LWC Navigation.Mixin when it has an override

Many Standard New buttons in my apps are overriden using Aura components. The do some Apex and then redirect to the real standard new pages. I now migrated such components to LWC. Where I had this in ...
3
votes
2answers
170 views

refreshView for Lightning Web Component?

Whats the lwc equivalent of this aura event? $A.get('e.force:refreshView').fire();
4
votes
1answer
243 views

LWC counterpart to Aura's force:createRecord event

My Aura component use the force:createRecord event to display an prepopulated new record page. What is the counterpart in #LWC? There is a createRecord thing but it does different things.
3
votes
0answers
47 views

ltng:require style issues in preview as a guest user in community

I think I've found two issues with the lntg:require tag, especially with the styles attribute (when previewing as a guest). First, some context: Let's say I have a CSS file as a static resource ...
0
votes
2answers
220 views

How to migrate aura:id to Lightning Web Components

How do I migrate a <div aura:id="foo"></div from Aura to LWC when I use Aura Id for finding? cmp.find("foo");
1
vote
1answer
59 views

How can I display a spinner when switching between lightning:tabset tabs?

I recently asked a related question about how to display the lightning:spinner while waiting for a component to render. Although I found a way to make it work, and have thoroughly reviewed the 'Events ...
2
votes
1answer
168 views

Migrate Aura components with lightning:actionOverride to LWC

In the LWC documentation I couldn't find anything on how to migrate Aura components using the lightning:actionOverride interface. It is needed to override standard buttons on standard record pages.
0
votes
0answers
12 views

Update column value in a table whenever a value in row is changed

I'm populating column values using aura:iteration in a table and i want to change the column values whenever a row's(populated using aura:iteration as well) value input is changed. The problem is that ...
4
votes
2answers
71 views

When do you need to use default="{'sobjectType': 'ObjectName'} for an aura:attribute?

I'm getting the below error- when I type into a lightning:input whose value attribute is bound to a field on the custom object- when I don't use the default attribute. Is this because the default ...
0
votes
1answer
31 views

How to access a dynamically generated html class name from a JS controller?

I was trying to concat a class name with index from the iteration component. If it's correct, how can I access this value from the JS controller? Component: <lightning:overlayLibrary aura:id="...
4
votes
2answers
1k views

Set CSS class dynamically in Lightning web component

How would I translate that from Aura to LWC? <aura:iteration items="{!v.contacts}" var="contact"> <div class="{!contact.isActive ? 'slds-tabs--path dimmed' : 'slds-tabs--path'}">...<...
0
votes
0answers
29 views

Correct formula for the last page in pagination

I make a pagination for lightning for my list of objects. First part is great. But when i get to the last page (v.pages == v.page) - something goes wrong. Values for the number of objects are ...
1
vote
1answer
26 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 ...
13
votes
1answer
439 views

Value provided is invalid for action parameter [VAR] of type 'String'" instead

Seems like upcoming changes in Spring 19 are causing us issues with "AuraEnabled" methods. Since forever now, primitive types were sent from Aura to APEX as String only as explained here: https://...
0
votes
0answers
46 views

<ltng:require not working in community

Component <aura:if isTrue="{!v.customScriptCSV != null}"> <ltng:require scripts="{!v.customScriptCSV}" afterScriptsLoaded=" {!c....
0
votes
2answers
36 views

Lightning components - Initiating attribute with controller with multiples sObjects

I'm Working on Lightning components I would like to add some values in my App, by its controller (aura:handler) I'm trying with this : component.set("v.objetsCamping", tabObjets); But it doesn't ...
0
votes
0answers
22 views

How to implement managed package interface?

I have installed a manage package in my sales force org. Package has given an interface to override/add custom business logic. It was working great with the below code. global with sharing class ...
0
votes
0answers
131 views

Uncaught Error in $A.getCallback() [chartDataProviderName is not valid] Callback failed: MyController/ACTION$getChartData

Hi I am getting the following error. Uncaught Error in $A.getCallback() [chartDataProviderName is not valid] Callback failed: apex://MyController/ACTION$getChartData .cmp file <aura:...
4
votes
1answer
189 views

$A.createComponent with does not work in the community after Spring 19 release

I have the issue but cannot understand what is wrong, hope you will help me here. There is the community with custom lightning Register component. When you fill some basic info about the user you ...
0
votes
0answers
82 views

Passing Map<String,Map<String,List<String>>> to an AuraEnabled method, but fails with Invalid Conversion Exception

Fails with the exception Invalid Conversion from runtime Map<ANY,ANY> to Map<String,List<ANY>> Also tried sending the JSON.Stringify(Map) before passing to AuraEnabled Method but ...
1
vote
1answer
62 views

Find value of div inside aura iteration on icon click!

I am trying to find the value of a div which is inside aura iteration on icon click which is also inside the same aura iteration. Here in this code below I am trying to find the value of the aura:id=...
3
votes
1answer
164 views

Apex `if (Boolean) `. Null exception virtually renders this check useless and unsafe

Being that an if (booleanVariable) check, where booleanVariable is null, throws a NullPointerException, it would seem that this check is unsafe. If so why would Apex allow it? This is especially true ...
0
votes
0answers
23 views

Incorrect index value being displayed on selection of radio button

I'm iterating over a list using aura:iteration. Each iteration I have a radio button where I have an attribute named data-index="{!index}". In the controller, when I try to print which radio button ...
4
votes
1answer
93 views

Bound data binding does not work with list items

Let me start by showing you what I am doing. ParentAppWithListAttr.app <aura:application > <aura:attribute type="List" name="justAList" default="['hello','world']"/> <aura:...
1
vote
1answer
41 views

Trouble with aura:if

I am not sure why this is not working. I have an aura:if condition, if the check matches then the item should be displayed. Here in this code below I am checking the ofc.agentName is not empty then ...
1
vote
1answer
245 views

How to change Lightning:Tab label dynamically?

I want to change label for tab dynamically, but that's not working. Please find the related code below: Component <lightning:tab label="test1" id="tabId"> JS Controller component.find("tabId"...
12
votes
4answers
2k views

What is involved in moving over to Lightning Web Components?

I read: Aura Components, leveraging its own component model, templates, and modular development programming model. Lightning Web Components, built on top of the web standards breakthroughs of the ...
0
votes
1answer
30 views

Aura:if - check with a regular expression

Is it possible to write aura:if conditions with regular expressions. Ia m trying remove records if the a certain field in that record is not a number. <aura:if isTrue="{! !add....
11
votes
3answers
1k views

Will Lightning Web Components have retrocompatibility?

I've just read here that Salesforce decide to change the framework used for Lightning Component. In according with this article, it seems very powerful under some aspects. In your opinion, the actual ...
0
votes
1answer
266 views

Lightning combobox options attribute not showing any options!

I am trying to populate the options attribute of the lightning combobox to the values of a component attribute. The channels component attribute has all the values in it, but for some reason it doesn'...