For questions about Lightning Web Components (LWC) - the UI framework for the Salesforce platform. When using this tag also include the more generic [salesforce] tag.
Questions tagged [lwc]
503 questions
0
votes
1 answer
Salesforce LWC Editor chrome extension error
chrome showing error "This extension violates the Chrome Web Store policy" for Salesforce LWC Editor.
should I delte it? and what is the alternative?

iWasCloud
- 107
- 2
- 13
0
votes
0 answers
I am trying to set custom validity for a date field, that throws an error message when I select any day which is not Sunday in Lightning Web Component
This is my lightning input for date, which has a onchange event dateHandleChange. This is my first lwc.
te.html

DeathNeuron
- 39
- 5
0
votes
0 answers
Data Table Tree Grid - Salesforce LWC
I'm new to this LWC and im trying to get the data be displayed in a data table tree grid
where i used a wrapper class together with my Apex Class.
i cant seem to find the problem as the data wont show in the table..
im able to see in the console so…

Azrael
- 1
- 2
0
votes
0 answers
is there a way to print lightning web component to pdf
I am trying to print lwc component to pdf, don't want to use vf page as it will require us to maintain field additions in both lwc as well as vf page.
I tried using jspdf library , but can't query element and print. Below is the js function I have…
0
votes
0 answers
How to make specific range search filters in lwc & apex?
I'm a freshman who just started developing apex and lwc.
I'm developing a search filter.The hard part is this.
After searching for a number, it is a logic that allows all values within the error range to be inquired.
I would like to know how to…

Yeonbi Ji
- 21
- 4
0
votes
1 answer
Salesforce LWC Trying to get the recordId from a lightning-datatable row(s), using the example from the docs & Apex method data returns blank object
The lightning-datatable is showing related info to the contact record.
I get the field that changed, with the new data, and the row id, but not the record Id.
Debug logs show I get back a blank Object when trying to add the recordId as per the Doc…

Dar Wright
- 15
- 1
- 4
0
votes
0 answers
LWC Pagination with page number
I'm a junior developer, I need some help to implement an lwc component which display records in experience site so I need to implement pagination since we have a large number to record.
I implement the 2 buttons "Previous" and "Next" it works fine,…

Hicham Hdidou
- 1
- 1
0
votes
0 answers
Why I am getting "Too many DML Statements" error when performing Update operation in LWC salesforce?
Why I am getting 'TOO MANY DML STATEMENTS ERROR IN THIS LINE?'
Note: Class is auraenabled(cacheable =true)
List obj1 = new List();
for (ABC A1 : [SELECT ID,field1, field2, field3, (SELECT Id, Name,ParentId,CreatedDate…

Praveen Behera
- 444
- 2
- 8
- 17
0
votes
1 answer
Handling click/hover events with d3.js in Analytics Dashboard LWC
I am currently trying to build an Analytics Dashboard LWC using the d3 library. I want to be able to listen for certain events on the SVG element, however no matter what I try it seems like that event is ignored. I initially thought that maybe it…

Tyler Edwards
- 184
- 2
- 9
0
votes
1 answer
How to show red flag icon in Salesforce LWC using SLDS?
I am writing a lightning html code to display red flag using the SLDS. However, I only see grey flag. Can you help me to get the red variant of the icon? Thank you!

Praveen Behera
- 444
- 2
- 8
- 17
0
votes
0 answers
Display data in lwc datatable as pdf
I want to display data as pdf that is in my lightning datatable in lwc. These list i am getting from api response . It can range from 10 to 2000 or even more.
So I tried below method to pass data to VF page
Approach 1 :
Passing list as string…

salesforce beginner
- 11
- 1
- 5
0
votes
0 answers
How to create Custom Lookup field in lightning-input which fetch the user name?
I want to create custom lookup field without using lightning-edit-record-form.
Notify to when completed = lookup(users),
its not fetching the users name. Here is what I coded:

Kavita
- 1
- 1
0
votes
1 answer
How to insert image into lightning-input-rich-text programmatically?
I have an image in base64 format and I want to push the image data explicitly into my lightning-input-rich-text. Is there any way?
My code looks like this:
…

nischal vasisth
- 127
- 2
- 8
0
votes
1 answer
How to get session id in static method while making callout
I am working on something which includes LWC with tooling API. I wrote this below method which makes a callout. but when I call this method this method from lwc at that time I'm unable to get session Id, but if I call this same method from the…

Harshit Tyagi
- 13
- 4
0
votes
1 answer
lightning-radio-group in LWC
I am trying to build the quiz app in LWC. this is the array in the controller file.
User should get the question and select one answer via radio button.
quizList = [
{
id: "Question1",
question : "Which one of the…

Wolfgang
- 515
- 1
- 11
- 41