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
Use FontAwesome on LWC
I am trying to place fontawesome icons onto my lwc component. Uploaded the zipped css file into the static resources and did referenced it in the lwc but no luck in getting this to work. Any suggestions?what is showing up instead of icon

Viet Bach Do
- 1
- 2
0
votes
1 answer
How to Add Toggle Button for LWC lightning-datatable
I am loading the user table data to datatable using LWC. I wanted to add toggle button for each record row to active and inactive some feature. Currently, I have added lightning-datatable's checkbox option as well for update selected rows as bulk…

lochana
- 121
- 3
- 15
0
votes
1 answer
Salesforce LWC bullet points not rendering in rich text component
I'm working with Lightning Web Components and trying to render a List inside the lightning-formatted-rich-text component. I need this component to be dynamic so calling out "ul" and "li" component isn't going to…

booky99
- 1,436
- 4
- 27
- 45
0
votes
0 answers
Parsing large CSV file in LWC
I have implemented the following code to parse a csv file, convert to a JSON array and send the JSON result to apex controller, which invokes the batch class to process the DML operation for opportunityLineItem object. The code is working fine up…
0
votes
0 answers
multiple pages in jspdf-autotable
I have used jspdf and jspdfAutoTable in my code to generate pdf.
It works fine on a single page, with upto 23 rows. As soon as I add 24th row (i.e the row to be present on second page), everything is distorted.
page-1 pdf screenshot
I have used…

user43598
- 101
- 3
0
votes
1 answer
How to Show/Hide button based on Profile in Salesforce LWC
I have develop LWC component which is normally used by normal users. In that lightning web component button is there as below.
The above…

lochana
- 121
- 3
- 15
0
votes
1 answer
JavaScript, LWC, Searching after User to stop typing, debounce
In input user writes a search phrase for searching products. And I would like to set searching after user stopped typing.
Here is a nice example, but not works in Lightning Web Components.
When I begin to write to the search input, there is an…

Elo
- 226
- 5
- 19
0
votes
0 answers
Invalid reference Account.BillingCountryCode of type sobjectField in file accountCreator.js
I try to get salesforce default field but failed.
error messsage is:
force-app/main/default/lwc/accountCreator/accountCreator.js Invalid
reference Account.BillingCountryCode of type sobjectField in file
accountCreator.js
my code here:
import {…

JamesFdl
- 15
- 1
- 4
0
votes
1 answer
How to grap account's ID or record id(e.g. "0015g00000Bkgg6AAB") on the account record page
I have a custom LWC widget in Account record page, when page loaded my widget, I need to know the account's ID or record id(e.g. "0015g00000Bkgg6AAB"),
my testing code below:
import { LightningElement, wire } from 'lwc';
import { getRecord,…

JamesFdl
- 15
- 1
- 4
0
votes
1 answer
File upload to Amazon S3 from Salesforce LWC (without apex)
I have tried create a LWC component which job is to upload a file in Amazom S3 bucket. I have configured AWS bucket perfectly test it upload a file by postman. But I could not file from LWC component. I was getting this error.
I am following this…

Jabir_Hstu
- 38
- 2
- 6
0
votes
1 answer
Pre selected Rows with Pagination not working in Datatable in Saleforce LWC
I am loading the user table data to datatable using LWC, the users who has not logging past two months. When the page loads first time I load all the list to front end and using pagination Im going through the records instead going to the server…

lochana
- 121
- 3
- 15
0
votes
1 answer
LWC, set record to database soql from JavaScript with wire and Apex, error
I try to write something to the database soql in JS, but it not works.
When I click to the button 'Add to Cart' then is called handlePlaceOrder().
Here is called Apex method placeOrder('hello') with parameter String.
And then it crashed "an internal…

Elo
- 226
- 5
- 19
0
votes
1 answer
LWC set value in lightning-input and maxlength="99" does not work
I would like set value of lightning-input after click to button quantity up, but it does not work.
And maxlength in input does not work too. It should be set to max 99, but it can be set also to 9999999999999999999.
html template:
…

Elo
- 226
- 5
- 19
0
votes
0 answers
How we can achieve navigation to another page in LWC OSS
I have two files created in LWC OSS app
first file at src/client/index.html and src/client/index.js
second file at src/client/index2.html and src/client/index2.js
I want to navigate to index2.html when clicked on the button in my-app (LWC component)…
0
votes
1 answer
The LightningMessageChannel named boatMessageChannel was not found in the workspace
In LWC Super badge Challenge 2, we have to create a lightning message channel named BoatMessageChannel.
I tried creating it with the name boatMessageChannel coz the naming should be in the camel case.
But while verifying the channel I'm not able to…

Jasneet Dua
- 3,796
- 2
- 10
- 15