Stack Exchange Network

Stack Exchange network consists of 174 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-attribute]

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

0
votes
1answer
16 views

Salesforce Lightning Component Picklist Value

Hi have a requirement as follows:- I want to make a Picklist value in the lightning component. After using the lightning:Select still i am not able to get the values provided in the list. Codes as ...
0
votes
1answer
29 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
1answer
27 views

Lightning component : Impossible to update value in form fields after resetting object value

I have this lightning component that is a form for an object called newLine : <aura:component > <aura:registerEvent name="updateFacture" type="c:factureLinesUpdate"/> <aura:...
4
votes
1answer
46 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:...
0
votes
2answers
30 views

Apply a css class depending on the value of the aura:attribute in a lightning component

Is it possible to apply a css class depending on the value of the aura:attribute in a lightning component? For instance I have the following component. <aura:component description="JustAComp"> ...
0
votes
1answer
41 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'...
1
vote
0answers
21 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
votes
0answers
21 views

Access map of maps values through aura:iteration [duplicate]

I have an Apex class that returns a Map<string, Map<string,string>> and I want to use it into a Lightning Component. I declared a <aura:attribute name="objMap" type="Map[]" access="...
0
votes
2answers
38 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=...
1
vote
0answers
24 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="...
2
votes
2answers
55 views

Lightning component attributes: Difference between Array and List

According to this document, the type type[] is "An array of items of a defined type" and the type List is "An ordered collection of items". I've tested the output of both structures (with integer ...
3
votes
1answer
114 views

Aura Attribute of Type Object is Supported in Flows?

I am working on a Flow Screen and trying to assign a value to a lightning component attribute from a variable in the flow. The flow screen allows me to select the lightning component but it doesn't ...
0
votes
1answer
42 views

Lightning : Unable to update records displayed using wrapper class

Can anyone please help me in this? My initial Use Case Scenario was to display a list of records in a lightning component, and providing the ability for users to update the same records. This was a ...
2
votes
2answers
229 views

How to set inner class list as aura attribute? [closed]

I am in need of showing a list of records in a summarized format, say all records belonging to Type 1 are displayed first, followed by the records of Type 2, and so on. Usually in visualforce page, ...
1
vote
0answers
41 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 ...
2
votes
0answers
191 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 ...
3
votes
2answers
120 views

How to use v.sObjectName to define fields in Lightning Data Service

To use my Lightning component for record pages of multiple types I need to load the record in a generic fashion. <aura:component controller="MyCtrl" implements="force:hasRecordId,force:...
1
vote
0answers
121 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 ...
0
votes
1answer
47 views

How to use component.get() in Aura Controller for Boolean value in Component

I have a boolean attribute in component Component <aura:attribute name="isOpptyExists" type="Boolean" default="false"/> Controller var isOpptyExists = component.get("c.isOpptyExists"); ...
0
votes
0answers
140 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 ...
1
vote
1answer
233 views

Set lightning component aura:id attribute dynamically while creating the component

Is it possible to set lightning component aura:id attribute dynamically while creating the component? Here is my code for the component creation: $A.createComponent( "c:...
3
votes
1answer
187 views

How do I use a JavaScript object as an aura:attribute?

How do I use a JavaScript object as an aura:attribute? Should I do it this way <aura:attribute name="jsObj" type="Object" default="{aValue: 5}"/> or another?
0
votes
0answers
211 views

Trailhead Lightning Component Basics - Attributes & Expressions

I created a component and also completed the assessment successfully of creating a component of attribute type 'Camping_Item__c'. I added the component to the page layout of the Camping_Item__c object ...
1
vote
1answer
42 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=...
2
votes
1answer
250 views

Expression evaluates to false in <aura:if>

I'm building a lightning component that displays one of many possible modals. I'm using to choose which to display, using an Integer attribute basically as a case. <aura:attribute name="modalNum" ...
3
votes
1answer
248 views

Why should I even use the SObject type for the aura:attribute type?

Sometimes I see code using the SObject type as an aura:attribute type and I don't see why! <aura:attribute type="Account" .. It feels like it behaves the same as "Map", it's just a javascript ...
0
votes
0answers
289 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:...
2
votes
0answers
30 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
1answer
275 views

Possible to use multi-line text in the designer for string aura:attribute or even rich-text attributes?

I have components which need complex parametrization like JSON values, richtext or very long text values. My attribute is defined as string like this <aura:attribute name="pageParams" type="...
8
votes
0answers
337 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 ...
0
votes
1answer
25 views

Component attribute set by one method coming as null in second method

I am calling two functions in my lightning bundle init in the following order helper.fetchAccountRequestAddressDetailsHelper(component, event, helper); console.log('before fetch'+component.get("v....
7
votes
1answer
609 views

Binding Javascript Objects to Aura Attribute Collection Types

I was testing Javascript Object Types and trying to bind them to aura attribute Collection types unsuccesfully client-side (for the most case), so I was wondering if there is a reference with a set of ...
15
votes
1answer
113 views

Passing calculated values to components makes them immutable

I'm calculating a value while I pass it to a component. But for some reason this makes it immutable, so I can't update it in my component. These are some cases I played with: <aura:application ...
0
votes
1answer
381 views

How can I dynamically create aura:attribute?

I would like to dynamically create components from other component. The thing is that, if any of those child components use events, I'd like to create the needed aura:attributes to store the info. ...
0
votes
1answer
196 views

Lightning : Select not storing changed data

The issue is that when I click on save, the data is not being saved... In the same object, I have a checkbox wich is being correctly saved, so I don't know what could be happening. I have next select: ...
2
votes
2answers
1k views

Unable to set an Inner Class as Aura Attribute type

Since SF update to Summer 18, we are facing this issue where an Inner Class could not be set as an Aura Attribute type. Lightning Component <aura:component implements="force:...
0
votes
2answers
1k views

To set a field of an aura attribute

Is there a way to append the field of an aura attribute? <aura:component implements="flexipage:availableForAllPageTypes,force:hasRecordId" description="AddBoatReview"> <aura:attribute name="...
5
votes
1answer
555 views

Unable to save a record using LDS

I use lightning data service method SaveRecord to create a record of type BoatReview__c. The boatReview__c object has following fields: I only populate Name and comment__C field using a form on my ...
1
vote
2answers
1k 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 ...
0
votes
1answer
1k views

getNewRecord to create an empty record - Lightning Data Service

I am trying to creating a new record using LDS for that I have first create a template record which can be used to create a record. I followed the example present in - https://developer.salesforce.com/...
1
vote
1answer
4k views

$A.getCallback() [Cannot read property of null- Simple form

I keep getting $A.getCallback() [Cannot read property of null when I start typing in the text fields of a form. Before adding the default I have the component as below: <aura:component ...
0
votes
1answer
1k views

Image not appearing on Lightning Component [duplicate]

In my below lightning component , I am trying to display an image using background image tag. <div class="imageview" style="{!'background-image:url(\'' + v.boat.Picture__c + '\')'}" /> I do ...
0
votes
1answer
949 views

Application Event is not getting handled in the component

I made sure I understand how the application event should be fired and handled and how the syntax is different from component Event. I executed the example at - https://ck-developer-salesforce-com....
4
votes
1answer
503 views

How to handle attributes of type “Set” in Lightning?

I am trying to collect record Ids of changed records. Therefor I'm using aura:attribute type="Set". But whenever I add the same id twice, it will be twice in my set. As described in the documentation, ...
1
vote
0answers
204 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', ...
0
votes
0answers
291 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
1answer
191 views

Lightning Component - Input Params and APEX

I am just starting to take a stab at Lightning and I have been struggling all day on something I hope is actually super simple. I want to take input from a user, click submit, and save the data. What ...
2
votes
1answer
336 views

How to restrict 'Paste' action in lightning component

We are trying to implement Re-Confirm email id functionality, to capture email address twice on the form. For this on the second email address field we want to restrict paste action by user. We are ...
0
votes
0answers
236 views

Aura attribute set in a controller function and get into another

I'm facing off an issue with aura attribute, I've an attribute defined as follow: <aura:attribute name="quoteLine" type="SBQQ__QuoteLine__c" default="{ 'sobjectType' : 'SBQQ__QuoteLine__c'}"/> ...
4
votes
1answer
549 views

Lightning Components: declare attributes or get the values from the DOM?

The question is fairly simple, but I haven't found any answers on the web. At the moment I have found two ways of getting the UI's values: Setting up an <aura:attribute type='Object' name='myName'...