Questions tagged [lightning-components]
The lightning-components tag has no usage guidance.
94
questions
6
votes
1
answer
276
views
How are global classes and/or components treated in 2nd Generation Packaging (unlocked and managed)
In 1st generation packaging, a global class cannot be modified after a managed release (and installation). There have been numerous discussions like this one on handling / upgrading / deprecating ...
5
votes
3
answers
578
views
Difference in using Lightning Component <lightning:badge/> and Normal DOM with slds <span class="slds-badge"></span>? Which is Better and Why?
Example:
<lightning:badge label="Lightning Component"/>
<span class="slds-badge">DOM Tag</span>
Which is better? Which is faster? And why should I use Lightning component if I am ...
5
votes
1
answer
10k
views
Close flow screen after the Flow finishes
Calling a flow from Quick Action wasnt refreshing the screen , so I calling the Update Screen action from the https://unofficialsf.com/the-update-screen-flow-action-component/. Quick Action updates ...
4
votes
2
answers
7k
views
Case Save and Close button in Lightning Experience
We use Save & Close button while creating a case so basically we are creating and closing the case at the same button.
But I can't seem to find this button in LEX.
Whats the solution here please ...
3
votes
1
answer
928
views
Inline Visualforce page vs Canvas App vs Lightning app
What are the difference between Inline Visualforce page vs Canvas App vs Lightning app.
I'm looking to build an app that needs to inject UI inside detail page for an object. Should work for both ...
3
votes
1
answer
254
views
Is @AuraEnabled(scope=global) real yet?
I'm trying to test out the new scope attribute for the @AuraEnabled annotation that is supposed to be part of Summer '22, but the compiler doesn't seem to recognize it.
@AuraEnabled(cacheable=true ...
2
votes
1
answer
640
views
Lightning Component - promise returned before Apex method is completed
I'm developing a component that calls an Apex method which performs a callout to our integration platform (generates an SAP customer from a salesforce account). The component is a button placed on ...
2
votes
1
answer
18k
views
How to use settimeout function in lightning component
I'm a bit new to lightning component and i'm trying to understand how can I use the settimeout function inside my component.
I'm trying to do this, but always getting errors and the component is ...
2
votes
1
answer
354
views
LightningAlert.open from New and Changed Aura Components
hope everyone is doing fine.
I`m new to Salesforce and still learning a lot from it. I need to chance some of the alert() function to the new LightningAlert, due to Chrome and Safari retiring support ...
2
votes
1
answer
482
views
D3js svg does not render on first page load
I have a custom visualisation inside a lightning component which uses d3js.
My svg is well rendered whenever I hard refresh the record page containing the custom component, but does not display when I ...
2
votes
0
answers
1k
views
Open New Tab & Focus from Lightning Component in Console
I currently have a LWC that is embedded within an Aura component. When a user clicks a button on the LWC it will convert a lead and return the new account id. The the Aura component is supposed to ...
2
votes
1
answer
2k
views
Flow Screen Lightning Components with Flow Navigation Actions throwing exception
I've created a flow screen component that allows the user to pass in an apex defined type with button labels and actions to perform the standard flow navigation actions. When adding the same component ...
1
vote
1
answer
248
views
Unable to update picklist value using LWC
When I click a button in LWC to update a picklist value, I get this error https://imgur.com/a/GHwFyVG. How can I fix this?
HTML
<template>
<lightning-card>
<template if:true=...
1
vote
1
answer
604
views
Should a newbie learn and code everything in LWC? [closed]
Should a newbie use Lightning Web Components for all new components, or are there any cases where we would use Aura or Lightning Components?
I'm new to Salesforce coding and I'm wondering about what ...
1
vote
1
answer
117
views
List has no rows for assignment exception on AuraEnabled method
I have created an Apex Class with an AuraEnabled method, which I am calling from a Lightning component.
After the method is called I am receiving the below error.
There was an exception List has no ...
1
vote
1
answer
5k
views
How can I pass object data from parent to child component?
I'm trying to pass the data(object) from parent to child component but I got undefined on my child component's variable when I passed the data(object) from parent to child.
/* Child Component*/
<...
1
vote
1
answer
679
views
Are lightning component visibility filters deployable? Where can I find them in metadata?
I have some custom lightning components on the layout. These components have some visibility filters. I need to add and remove some filters. It is easy to do it in UI in page layout settings, but is ...
1
vote
1
answer
61
views
How to dynamically select and disable an element in a row in the table when the other element is selected
I am new to Aura and hence was not able to find out the exact way to disable the column.
We are building a table where I need to disable other cells in the row when one of the cell is selected.
The ...
1
vote
1
answer
820
views
Accessing the record fields in Aura lightning component
I am trying to access the value of a field in the lightning aura component like below
<aura:component implements="force:hasRecordId" access="global" controller="...
1
vote
1
answer
4k
views
Why can not get the data item on the li onclick event?
Work on LWC. Why I can not get the data item on the li onclick event?
<template>
<li role="presentation" key={item.key} class={itemClass} id="ms-list-item" data-id={...
1
vote
1
answer
876
views
Add a Lightning Component to Activity Layout
I want to modify the Send Email Global action and add some custom fields to the layout which is not possible in the standard Global Action. Hence I am trying to create a Lightning Component and add it ...
1
vote
1
answer
38
views
How do I pass a variable to a flow component on a Lighting page (that is NOT the recordId)?
I have a Flow for which I have 2 input parameters - the recordId and another Id for a lookup linked to the recordId. Adding the recordId is easy, but I have no idea how to pass the other variable.
...
1
vote
1
answer
72
views
Radial chart attributes
I created a visualforce page which displays a radial chart. How can I change the number of lines of the chart? My chart displays always two lines per value 1, 2, 3, 4, 5, but I want to display just ...
1
vote
1
answer
231
views
Need to extract a specific record based on record id from an array of Sobject in lightning component
My ask is quite simple here, i have a lightning component where i have an attribute of type Array of Account (Account[]). This array already has a list of Account records. At a certain event (on click ...
1
vote
1
answer
528
views
Related record component - does not show action's default values
I am using Lightning in my org
I have a requirement to have a tab for resolving a case
For this I have created a new case quick action - I called it Resolve Case.
Also I have set the Status field ...
1
vote
1
answer
7k
views
Get Custom Setting's field value in Lightning Component
I have a custom setting with API Name: Company_Setting__c. I need to access the value stored in this custom setting in lightning component. I got a field with API Name: Company_Phone__c.
Below is my ...
1
vote
2
answers
2k
views
call tooling API when using lightning component [duplicate]
When I make request tooling API from Apex by using lightning component, the error This session is not valid for use with the REST API is responsed.
Also, the response status code is 401, and status is ...
1
vote
0
answers
117
views
Lightning app page is not accessible from partner community user
I made a lightning app page and placed my lightning component on it. It works perfect as an admin user, but when I login as a partner community user, that app page is not accessible. We are using ...
1
vote
0
answers
548
views
Can we add previous and next arrow in the Lwc lightning-carousel tag for image slider? [closed]
I am trying to build component that has lighting carousel tag and which has image slider in it but I wanted to add arrow buttons of previous and next button for manual control over the slider.
1
vote
0
answers
66
views
Can't scroll after lightning component quick action finished
I have implemented this Lightning component quick action and it works fine.
Lightning Web Component LWC Quick Action button Lead Ownership
The only issue I'm having is that when the button is clicked ...
1
vote
0
answers
1k
views
Custom "view all" button on Lightning component similar to related list view all
Created a lightning component to display list of records and would like to open the component in new window to show all the values.
But when opening the component in new tab, the data is not ...
1
vote
3
answers
4k
views
How can I load jQuery in LWC?
For the convenience of the user, I'm implementing the requirement of katakana is automatically entered when entering hiragana or kanji in Japanese using this JavaScript library.
You can check the ...
1
vote
0
answers
193
views
How to access Add Products standard button from custom lightning component
want to call this 'Add Products' functionality from a custom lightning component. Is there a way to do this?
1
vote
0
answers
156
views
Creating a two-dimensional lightning table [closed]
I created a lightning table and wanted to have a two-dimensional table with inline-edit.
My goal is to convert my current to table to something similar to this:
Currently my table is.
Anyone who has ...
1
vote
0
answers
419
views
Show Popover on Scroll-able Div
I have a custom component which display list of result and a popover like below -
When i make the div scroll-able, it looks like below, (Reason for scroll - List of result is too long) -
Popover ...
1
vote
1
answer
2k
views
Open LWC Component upon clicking Bar Chart data-point
My requirement is to open different LWC Component upon clicking different Bar Chart data-point.
I am using ChartJS library to achieve this.
Here is the code I have tried to implement ---
I am using ...
1
vote
1
answer
596
views
Apex/Lightning component - How to access owner field label using getDescribe
In a lightning component, we have to display some records in a datatable with selectable rows and where the table header will display each column field label.
To cater for multi-language, the header ...
1
vote
0
answers
52
views
Customise Standard lightning Component from custom lightning component
I have a custom feed filter visualforce page created with the help of this link. And then I added the vf page in lightning component with iframe and in case page layout. After the page is loded main-...
1
vote
0
answers
446
views
Platform event subscribers on Visualforce page not being called always when platform event is published
We have an implementation in which there are multiple Visualforce pages(seven pages). These pages are using platform events to communicate between each other.
The JavaScript code to subscribe to ...
0
votes
1
answer
171
views
How to combine two aura ifs into one?
I have been trying to to simplify a nested <aura:if isTrue> into a single line. I thought I could wrap this with an or(statement1,statement2) but I think I'm missing something. The expected ...
0
votes
2
answers
88
views
Lightning Datatable record opens blank URL
I have created a LWC component in which some details from Opportunity object are to be displayed. When user clicks on a Name in the Name column, I want to relevant record page to be opened. Instead, a ...
0
votes
1
answer
539
views
Why Are "Opportunities" showing up twice under related lists?
On my Account and Contact page layouts I am seeing two "Opportunities" under related lists...
Opportunity object only has a lookup to AccountId and my Account object has no lookup to ...
0
votes
1
answer
32
views
If conditions while passing paramters to child component in aura
I am trying to pass a value from parent to child component in the following manner
<c:contactSelect accountId="{!IF(v.proposal.CurrencyIsoCode != 'US' && v.proposal.BillingCountry__c !=...
0
votes
1
answer
2k
views
Searchable pick-list in Lightning Component? [closed]
I am trying to implement the searchable pick-list in lightning component. I followed this post to implement with help of external jQuery select2. Does any one suggest me the best way of implementing ...
0
votes
1
answer
140
views
Why is Refresh Apex not working while Inline Edit in LWC datatable?
Why is refresh Apex not working during Inline Edit? When I edit the record, even though the new value gets updated, but in the datatable the old value gets displayed. How can I fix this?
.html
<...
0
votes
1
answer
9k
views
Retrieve the field values of record in Lightning Component
I am using the Lightning Data service in my Lightning Component to update a case record, before I do update the record I need to check on the field value and update accordingly. Below is my component
&...
0
votes
1
answer
459
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
1
answer
535
views
Disable "Save" button after condition on Lightning Component
Hi I'm new to Salesforce and am stuck on this part:
How to disable the "save" button after it was already clicked?
My Component:
<div align="right">
<lightning:button ...
0
votes
1
answer
630
views
How to remove mandatory error messages
I am using lightning input field which is mandatory.when ever the input field is empty required error message is displaying.Now what is happening is as soon as we start typing some text inside the ...
0
votes
1
answer
901
views
Loading/ View records of Account using Lightning data service (force:recordData component)? [closed]
I have been practicing the examples given in Lightning developes Guide and the topic is Display Record Data in a Custom User Interface Using force:recordData
I copied and pasted the below code ...