Questions tagged [lwc]

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.

503 questions
0
votes
1 answer

Can we use Lightning Message Service among LWCs in Lightning communities?

I am building a wizard (Next Previous button) using lightning web components for the community users. Is it possible to use Lightning message service for the communication among components? Thanks Puneet
0
votes
0 answers

Getting error while pushing a lightning component to salesforce org

I am following a trailhead guide and using sfdx force:source:push command to push my lightning component after I have done creating and updating my lwc component. I am getting below error while pushing MissingMessageError: Missing message…
bhansa
  • 7,282
  • 3
  • 30
  • 55
0
votes
2 answers

Calling Apex Class from Lwc only it is getting Saved

I have create one custom object. Using a LWC component, I try to create one record but when try to save it from apex, only ID is getting printed not the Name. I am not getting why only Id is getting printed not the name. Could anybody please help me…
0
votes
1 answer

How to make edits to a LWC LightningDatatable programmatically?

is there a way to edit cells in a Salesforce LWC LightningDatatable programatically and make those changes trigger the oncellchange event? I want to be able to programmatically make edits (and make them visible) in a datatable column without…
dev4life
  • 10,785
  • 6
  • 60
  • 73
0
votes
3 answers

How to download all attachments of all records of a custom object in Salesforce?

I am new to file handling in Salesforce. I want to grab all the files attached to all the records of a custom object. Can anyone help me with it?
0
votes
1 answer

Is there any possibility to refresh VF page from aura component?

1.I created a record for opportunity.. 2.In opportunity detailed page..i edited the page and added LWC component,Aura component and Visual force page which contains stage field.. 3.when i updated stage filed either from aura or lwc or vf or in…
0
votes
1 answer

Clear lightning-input and lightning-textarea on click?

Looking to reset the two text fields labeled 'Name' and 'Description' when the 'Cancel' button is clicked. However, I'm getting the error ' [document.getElementById(...) is null]'. After some research, I've learned this error appears when the JS is…
ThatBrayKid
  • 23
  • 2
  • 8
0
votes
2 answers

Lightning datatable throws an error when attempting to use onsort event

When attempting to sort a lightning datatable, the error 'NoErrorObjectAvailable' pops up. HTML: key-field="Id" data={jobItems} columns={columns} hide-checkbox-column onrowaction={handleRowAction} …
Dima
  • 21
  • 1
  • 4
0
votes
1 answer

LWC Create and Dispatch Event Does Not Work

Attempting to simulate a mouse click on one button, by clicking on another button. The goal is to reuse the behavior of a single custom button throughout the page. Why is the dispatchEvent not working? How can a click on be…
jvol
  • 26
  • 5
0
votes
1 answer

Does Lightning Web Component IF Directive support multiple conditions?

Hi I am new to LWC world & its syntax. I wanted to ask, if LWC supports multiple condition in a single statement? Ex: Getting Error on using multiple conditions on…
SVinayaka
  • 3
  • 1
  • 2
  • 4
0
votes
1 answer

How to grab values of tracked JS list fields?

I'm having trouble grabbing the values of a tracked JS list with fields "Name" and "Content". If I make individual lists for each field, it works fine. But I don't want to use multiple for:each in my HTML. When I try the first method, it does not…
ThatBrayKid
  • 23
  • 2
  • 8
0
votes
1 answer

Is there a way to give context to a JSON.parse reviver?

So I am formatting data inside JSON Strings and I need to use my application context (like this.name etc.) INSIDE the reviver. Code example of reviver: formatReviver = function (key, value) { if(context.name === value) //do stuff } But…
0
votes
1 answer

Switching content in LWC with radio group?

I have this radio group which should work in that if I select the top option, the first two rows are shown only, and if I select the bottom option, the last row is only shown. How can I create this dynamic sort of tab selection within LWC?
Sadi
  • 5
  • 1
  • 2
0
votes
2 answers

Lightning Web Component Specialist Super badge: Challenge 7 throwing error

I am facing error in LWC Specialist Superbadge Challenge:7 import { LightningElement, track, wire, api } from 'lwc'; import getBoatsByLocation from '@salesforce/apex/BoatDataService.getBoatsByLocation'; import { ShowToastEvent } from…
0
votes
2 answers

Stylizing LWC radio list?

So right now I'm trying to build this radio list for the regions in LWC, the functionality works fine in that when you click on the regions it selects all the states below for that region. https://i.stack.imgur.com/y2MM8.png However, I want to…
Sadi
  • 5
  • 1
  • 2