Questions tagged [aura-attribute]

Describes an attribute available on an app, interface, component, or event of the aura framework

39 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
11
votes
3answers
2k views

Lightning: dynamic index in aura attribute with type List

related post I am having the same issue. Trying to access array with dynamic index arrayList[index] (index from aura:iteration), but Salesforce doesn't support that. Does anyone know how to do this?...
9
votes
0answers
1k views

How to set attribute in the designer to a string-value which contains expression-tokens like “{!…}”?

I have defined a string attribute like <aura:attribute name="pageParams" type="String" default="" access="global" /> and in the design <design:attribute name="pageParams" label="Custom ...
9
votes
4answers
8k views

Uncaught TypeError: a.getAttribute is not a function

Scenario: I have a component that has an <aura:renderIf> within an <aura:iteration>. The <aura:iteration> references a component attribute called "selectedItems" to display ...
5
votes
0answers
177 views

Can I set an ECMAScript 6 Javascript Map() Object as a Lightning Component Attribute?

I have a scenario where I am building a Javascript Map() object in my client controller helper of a Lightning component. Ideally, I would like to use this map for client-side filtering in a component. ...
5
votes
2answers
9k views

How do you set a default value on lightning component force:inputField which is a lookup?

I have a lightning component (Summer 16) which contains a "Task" attribute as follows: <aura:attribute name="task" type="Task" default="{ 'sobjectType': 'Task' }"/> Further down the page, ...
2
votes
0answers
445 views

Use Lightning Component Attribute to Pass URL via Variable

I am trying to create an RSS feed Lightning component. I am able to successfully setup the the component to read the URL for the feed if I hard code it into the component. Since I want an admin to be ...
2
votes
0answers
33 views

Evaluating references of a Child Lightning Component body

How can I evaluate the body of a child component so that the expressions run in context of the included component? I am trying to do this in the same way that aura:iteration processes its body. I have ...
2
votes
0answers
356 views

Dynamically create Form from Fieldsets in Linhtining component Using <force:InputField> and <aura:repeat>

We are trying to create Fields loaded from Field-sets in a Lightning component Using Aura This is what we Tried ; # <aura:iteration items="{!$ObjectType.Lead.FieldSets....
1
vote
1answer
45 views

columns in lightning aura table is not visible to certain profiles

The Columns Access Revoked and Tax Status are not visible in lightning aura table of a page because there are two issues in the code below: currentUserProfile (String) was compared in permissionMap ...
1
vote
1answer
1k views

How to navigate to one component to another by passing parameters

I'm new to Salesforce. I have just started with lightning Aura components. I want to understand simple workflow of aura. Can anyone help me with the code for below requirement. Thanks in advance. ...
1
vote
1answer
418 views

Attribute defined in one function is undefined in the other

Trying to pass a variable from one js controller function to another and having issues. The first function runs before the second and the console.log shows the Secondary attribute as defined before ...
1
vote
2answers
739 views

Standard aura:attributes and aura:method attribute

My question is in regards to the fact that I need to get a value from Child component to Parent component. I want to directly call a method from the parent to the child to obtain some data from that ...
1
vote
0answers
65 views

Userscripts manipulating aura components

Objective: To write a userscript that runs on my browser and scrapes data from a specific salesforce dynamic form that I have to fill out during my job. Summary: I am using TamperMonkey to run my ...
1
vote
0answers
26 views

Javascript to Aura type coercion

Previously I was able to have the following component and init function, where the Id for lightning:tab would be implicitly coerced to String from Number. Component: <aura:component implements="...
1
vote
0answers
146 views

When creating modal with showCustomModal(), dynamically replace original body component with new component

I'm doing a custom version of the 'Add Products to Opportunity' standard component, and I'm trying to fit a two-stage process within a modal ('Select Products' and 'Create Line Items'). I thought I ...
1
vote
0answers
281 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 ...
1
vote
1answer
156 views

Disable aura:Iteration field but keep name attribute visible

How could it be accomplished to display the field name above the input field if the field is disabled? As of now, if the field is disabled, so is the e.fieldName attribute. <aura:iteration items=...
1
vote
2answers
2k views

Save Error - Undefined - Lightning data service

I am trying to save a record that a user creates using a form. I get a strange error description as "Undefined" which I do not understand. Below is my component, controller and helper class. The save ...
1
vote
0answers
314 views

Dynamcially referencing an component attribute in default attribute of type=“object[]”

What is the correct way to default another attributes when declaring object[]? This: <aura:attribute name="foo" type="object[]" default="[ { 'title': 'Account Name', ...
1
vote
0answers
357 views

JS controller - get all aura:attribute

I've got component with some attributes. For example: <aura:attribute name="missedCalls" type="List" access="global" /> <aura:attribute name="tryingToInitiateCall" type="Boolean" access="...
1
vote
0answers
686 views

Changing value of aura:attribute on .cmp page

wondering if this statement would ever work. I decalred attribute at top of page <aura:attribute name="groupTracker" type="String"/> and on an aura:if i wish to set the following <aura:...
1
vote
0answers
283 views

<aura:handler name=“change”> stops working after being called three times

I'm having an issue with a handler which initially fires as expected for three times, but then stops responding after that. The parent component has three attributes: A list of Custom SObjects A ...
1
vote
0answers
28 views

Aura External Schema and DTD's

I would like to import aura schema/DTD into my IDE, do salesforce provide the DTD for aura? where I could find it?
0
votes
0answers
20 views

How do I add fieldinput values to an object in Lightning?

Im working on a component where a table is generated by data entered into 3 input fields (Year, Make and Model). I have a function where the user's inputs are assigned to their corresponding variable ...
0
votes
2answers
37 views

Reading Apex enums in LWCs: “AuraEnabled fields cannot be static” when annotating enum with @AuraEnabled

I have a service class with some error types: public with sharing class ServiceClass { public enum ErrorType { ERROR } } And a controller method: @AuraEnabled(cacheable=true) public static ...
0
votes
0answers
25 views

How to pass attribute into lightning component from Marketing Cloud

I have a custom lightning component which have attribute is AccountID. I want to know is that possible to create custom community page that embedded the custom Component above and then public that ...
0
votes
0answers
25 views

How to change the value of aura:attribute inside a aura:iteration when a condition is met?

I want to change the value of aura:attribute when a particular condition is met inside an aura:iteration. This is the code: <aura:component> <aura:attribute name="products" type="List" ...
0
votes
0answers
28 views

A Posted Solution to a lightning:formattedDateTime Problem No Longer Works

I have the same problem asked about here, where the date displayed by the lightning:formattedDateTime component does not match the date field that's its value. I attempted the answer chosen in the ...
0
votes
2answers
50 views

Selection is not working for third selection

I write following component code : <aura:component controller="TransactionsalSecurity" implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:...
0
votes
1answer
38 views

Creating dynamic component with buttons, events not getting raised

I have created dynamic component but somehow the event is not getting generated : $A.createComponent( "aura:unescapedHtml", { "value": '<div class="slds-notify_toast slds-theme_default"...
0
votes
0answers
31 views

List item deletion in aura: iteration

I have a list in which every time I click the "Adicionar outro CID" button a new line with a field and a button "Remover" is added just below it: Original image: After clicking the button: If I ...
0
votes
0answers
149 views

Error with Object Attributes in Lightning Component

I'm getting an error when setting an Attribute with either custom or standard object in Lightning Component. Component Code <aura:attribute name="acc" type="Account" access="global" /> Below ...
0
votes
1answer
47 views

Attribute in lightning component is failing to evaluate properly in conditionals

I am unsure of what I am missing here... So I have a child component with an attribute: <aura:attribute name="recordClosed" type="Boolean" /> In the component I am doing something like this: ...
0
votes
2answers
202 views

How to pass radio group value from Parent to Child component?

I have to pass radio button value to the child component. Here is the code snippet of the same on the Parent component. <lightning:radioGroup aura:id="msRecTypeOptions" name=...
0
votes
0answers
252 views

Change event on UI:InputText in Aura:Iteration throws 'afterRender threw an error in 'ui:inputText' [(a || s).replace is not a function'

I am facing a very strange error when applying change event on UI:InputText that is inside Aura:Iteration. When I focus out of the Input it throws me below error. This page has an error. You might ...
0
votes
0answers
746 views

Data binding of lightning:input and aura:attribute with type sObject(field) is not working

There is a weird scenario I'm facing while I try to bind the markup UI tags with Lightning aura:attribute as type sObject (fields). I'm trying to bind data to sobject's fields for different lightning:...
0
votes
0answers
498 views

Deployment of lightning components using eclipse

I have tried moving lightning components and applcn from one sandbox to other. using option deploy to server but it fails. I have added package.xml file * AuraDefinitionBundle ...
0
votes
0answers
1k views

Can we create a lightning component attribute dynamically and inject it in the component mark up from the controller/helper?

I am trying to create components dynamically in a lightning component. However, the HTML markup or DOM inside which these components are being created are also not static. I am also creating the DOM ...
0
votes
0answers
48 views

Uniqueness in IDs when display the same component on the same page

I've created a single 'parent' component which I'm displaying through 2 other components on one page like so: parentComponent: <aura:component> <aura:attribute name="kind" type="...