Questions tagged [lightning-components]
The lightning-components tag has no usage guidance.
102
questions
6
votes
1
answer
379
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 ...
6
votes
1
answer
14k
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 ...
5
votes
3
answers
615
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 ...
4
votes
2
answers
8k
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
1k
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
462
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
767
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
22k
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
216
views
Better LWC performance: sibling components with separate wires, or a single service component with a wire that sends data via Message Channel
If you have 10 separate components on the same lightning page that are all using the getRecord wire and retrieving approximately the same subset of fields, is there a performance penalty in comparison ...
2
votes
1
answer
624
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
664
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 ...
2
votes
0
answers
577
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
841
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
161
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
6k
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
881
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
590
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://i.stack.imgur.com/JDk93.jpg. How can I fix this?
HTML
<template>
<lightning-card>
<template ...
1
vote
1
answer
1k
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
2
answers
399
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 ...
1
vote
1
answer
2k
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
5k
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
1k
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
55
views
Flow wrapped in a lightning component used as a Global Action Button not closing flow screen after entering data
I've searched and tested out many solutions listed on the site but still not able to have my Screen flow closed when calling from Global Action. The screen flow will create the Case record then a new ...
1
vote
1
answer
99
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
430
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
679
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
8k
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
2
answers
66
views
Cannot pass text from LWC to Apex Class
I'm attempting to pass text from a lightning-textarea to my apex handler. I'm still getting null values for the message, but am not sure why. Any help would be greatly appreciated.
HTML:
<...
1
vote
1
answer
131
views
"lightning locker" in B2b commerce template does not turn on
"lightning locker" in B2b commerce template does not turn on, how can I switch to on?
after activating it recharges and goes back to off
1
vote
0
answers
167
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
644
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
119
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
2k
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
5k
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
215
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
186
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
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
628
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
53
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
495
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
210
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
1
answer
839
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
49
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
2
answers
77
views
Does Loading Static Resource Dynamically through URL pass the Salesforce AppExchange Security Review
We have created a Second Generation Managed Package and in it we need to load the static resource which is uploaded by the Subscriber (the one who installs the package).
We have loaded the static ...
0
votes
1
answer
223
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 ...
0
votes
1
answer
460
views
Limit datatable rows with just javascript, no Apex Controller
I have a LWC Datatable that can return up to 200+ records so I want to initially limit the number of rows displayed down to 25. There is no apex controller involved so have not been able to ...