Questions tagged [aura-attribute]

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

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

How do I open a new form and query the database at the same time?

On the current page, I have a "New" button that opens a new form, where I need to fill in the "Account" field as well. And I want to get a list of "Account" values ​​in ...
0
votes
1answer
10 views

Can't Pass aura:attribute to force:recordData recordID Field

I'm probably missing something crazy simple, hopefully someone here can clear this up for me. I have a simple component as follows: <aura:component implements="flexipage:...
0
votes
1answer
14 views

Not able to get attribute value using component.get in init method

I am setting a attribute value in helper using component.set("v.value",result( and calling this helper in init handler to show/hide some values depending on this boolean value. But when I ...
1
vote
1answer
15 views

Attributes & Expressions - Create a Packing List Item Component

I'm new to Salesforce and stuck on a challenge on Trailhead. Inside an Aura component, I am supposed to create a custom attribute. This seems to be the first step, but it fails regardless. My code: &...
0
votes
0answers
18 views

Dependent Picklist Values not fully available

I have an aura component and it is designed to be used with case. The issue is when user opens the form and changes a controlling picklist ("Type") the dependent picklist ("Sub-Type&...
0
votes
0answers
46 views

Display Sparklines in a table in lightning components

How can I display sparklines based on my data inside table for each row dynamically in lightning Components. I have tried to display them but sparklines are not displaying in my table last column. ...
0
votes
1answer
36 views

Passing wrapper class object list to child component from parent

I am trying to pass an attribute from parent component to child component. But the catch is this attribute is populated in apex controller using wrapper class. So currently it is a list of wrapper ...
0
votes
0answers
18 views

alert in aura lightning mobile application

Scenario is on Case detail page I have Add Case Activity link. Once I click on link using e.force:navigateToURL it is navigating to Create Case Activity page and once the user created the activity(...
0
votes
0answers
8 views

How to capture if component is disabled?

Aura lightning component has multiple picklists with dependencies. When user selects a parent picklist the dependent picklist populates and may or may not automatically becoming enabled / disabled ...
0
votes
2answers
24 views

Ligtning:recordEditForm onload , onSubmit ,onSucess action values

I have a doubt .During onLoad action ,are the record values the old and during the onSucess the record values are updated ? I want to send both the old and updated values of the record updated using ...
0
votes
0answers
20 views

Aura:If results in label - field not value

When using aura:if, I can't get the value of the field to show. Unless I'm using lighting:outputfield the result is the field label. Is there something else I should do to ensure the value is produced ...
0
votes
2answers
30 views

Display space between aura properties

I use a custom label to display text in user language in my aura component. My component has this line : {!v.tr.Displaying} {!v.endUsersDisplayed} {!v.tr.users} {!v.tr.outof} {!v.totalNumberUsers} I ...
0
votes
0answers
21 views

Aura attribute as type object - not calling its fields with __c at the end

I am editing someone else's code, having trouble understanding the below code. Here creativeRequest is as type object, but its fields are called without __c at the end. I have added a new field to ...
0
votes
1answer
54 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
3answers
123 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
1answer
51 views

I want to populate respected account on account field when any opportunity select

I have created a component and i created a onchange event on opportunity field it called a controller method and this controller method called a apex method with opp id and return acc id so i can ...
0
votes
0answers
37 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 ...
2
votes
3answers
114 views

Unique Identifier of a Lightning Component Instance

I'm working on a relatively simple Aura component, but I'm running into an issue. I'd like to create either a cookie or a localStorage item for a component when a user takes action on it (closes it) ...
0
votes
0answers
58 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
3answers
20 views

salesforce : AccountId is not able to get it form lightning component js controller, giving undefined error

Comp: <aura:attribute name="ServiceRequestRecordFields" type="WorkOrder"/> <force:recordData aura:id="recordEditor" layoutType="FULL" ...
1
vote
1answer
29 views

component.set does not pass value from helper to controller via component

I try to set a value in my lightning component via the helper function, but it does not set the value in the component, and I get the wrong value when I try to do component.get in the controller. Here ...
0
votes
1answer
23 views

Aura - load boolean field value into toggle on doInit not working

I'm trying to take the boolean value of a checkbox field and load it into a toggle via the doInit but it's not working. Am I doing something wrong? When I debug it says osiValue is undefined Happy ...
-1
votes
1answer
92 views

Need help in SLDS

enter code here Need to create design like this in screenshot. I am ready with the component but not sure what SLDS i can use to : 1) Showing Green Border top of each section 2) Display fields in 2 ...
0
votes
3answers
41 views

Does not return contact ID to go to another page

When I check which value is returned at the click of a button, null always returns to me. And when I click on the button to go to another page, it always goes to another page (it makes no difference ...
1
vote
1answer
69 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 ...
0
votes
1answer
25 views

How to get row when iterating over aura attribute in controller

here is what i am trying to do CMP <aura: attribute name= "list" type=CustomObj[]/> Controller var list = component.get("v.list"); var FinalList=[]; //iterating over list for (var i in list){...
1
vote
1answer
29 views

Why is my component's attribute being modified?

I'm building a small component which displays information based on a currently selected object called metric. Metric Card Component <aura:component implements="forceCommunity:...
1
vote
1answer
54 views

Adding Multiple View Params to a Lightning Button

I'd like to disable a Lightning button under certain conditions. <aura:attribute name="showSecurityComponent" type="Boolean" /> <aura:attribute name="checkCaptcha" type="Boolean" default="...
0
votes
1answer
49 views

How to include & symbol in a form label and value

I am trying to have a form label and value with an & symbol (see below). I get an error. Is there a way to do this? {'label': 'M Davis & Sons Inc', 'value': 'M Davis & Sons Inc'},
0
votes
0answers
42 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 ...
1
vote
1answer
68 views

Aura Attribute access change

We encountered this issue "You can't set access to 'private' on attributes 'fields' because this component is referenced by Lightning Page: 'Record Page'" when trying to save an aura component with a ...
1
vote
1answer
765 views

Aura Component Lists and Javascript Arrays

I've recently noticed that if I set an aura:attribute of type "List" from a Javascript array, then later retrieve that same attribute value via component.get("v.myListAttribute"), the return value is ...
1
vote
1answer
1k views

How to assign aura:attribute for objects with default value null?

This must be a a very simple question, but may be I'm doing it wrong. I wanted to set default aura:attribute value to null on lightning component as below. e.g. <aura:attribute name="selectedObj"...
1
vote
1answer
301 views

Render aura:attribute within aura:unescapedHtml

I'm using the aura:unescapedHtml component with some custom labels that will also include markup. For example: Custom Label: <labels> <fullName>Register_Text</fullName> <...
0
votes
2answers
56 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
55 views

Error on second selection for same code in lightning code works fine for first time but second time it gives error

This code runs fine for first selection and also for first time but for second selection it gives following error This page has an error. You might just need to refresh it. Action failed: c:...
0
votes
1answer
137 views

Hide text using aura:if

I'm trying to troubleshoot here for a day. My end goal here is to hide the Test text, depending on the Product_Family__c value. Here is the code, please let me know what am I missing. Apex public ...
0
votes
3answers
1k views

Show/Hide Text depending on a field value using Aura Component

I am trying to hide/show text depending on other field value. Here's the code. Component <aura:component controller="updateCheckBoxPlan" implements="force:appHostable,flexipage:...
0
votes
2answers
246 views

Aura iteration is not holding on particular selection value resetting to first value every time loop is started

<lightning:select label="Permissionset Names" onchange="{!c.doInit}" > <option>None</option> <aura:iteration items="{!v.set}" var ="d"> <option>{!d....
0
votes
1answer
620 views

You might just need to refresh it. Assertion Failed!: Provider type not supported : false Failing descriptor

Iam facing following error with my code: This page has an error. You might just need to refresh it. Assertion Failed!: Provider type not supported : false Failing descriptor: {c:Picklistversion2} ...
0
votes
1answer
52 views

Retrieve currentRecord from aura:iteration to controller.js

I am quite new in lightning and I need an hint in order to resolve a problem. What I would like to achieve: in a table component, for each record I would like to see a column with different icon ...
5
votes
2answers
954 views

Detect lightning:recordForm change in mode attribute

I'm trying to disable some surrounding components based on the mode attribute within lightning:recordForm (i.e. anytime I'm in edit mode, I'd like to disable a lightning:buttonMenu that sits just ...
0
votes
1answer
230 views

on clicking save, record is not inserting using lightning component

im new to lightning, i created a lightning component to insert contact records,but when i click on save record is not getting saved.here is my code apex controller public class cninsert { @...
1
vote
2answers
2k views

How to retrieve field attributes from dynamic fields in lightning component

I am loading my fields dynamically trough a fieldset. Using aura:id="requiredField" on the lightning:inputField I can get the fields using a map in the controller. I have made some fields required at ...
1
vote
1answer
2k 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. ...
0
votes
1answer
47 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"...
-1
votes
1answer
398 views

How to use attribute type “Set” in lightning [closed]

Unable to create "set" from aura controller and use it in lightning.Its not working properly. Component: <aura:attribute name = "setObj" type = "List" default="[]"/> <aura:iteration items=...
2
votes
1answer
78 views

force:lightningQuickAction . Will implementing this open the component as modalpop up directly?

I want to open a component as modal up from another custom of another component.If my child component has force:lightningQuickAction ,should that open directly as modal pop up without writing the ...
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
1answer
216 views

Lightning Inter-Component Communication Patterns: how to pass efficiently pass down data from parent to dynamically created child? [duplicate]

I know two ways of pass data from parent to child in the case of a static created child components: passing attribute values from parent to child and exposing child methods to parent. The latter ...