Questions tagged [lightning-web-components]

This tag is for questions related to JavaScript, CSS, or Markup when used in the Lightning Web Component (LWC) programming model, or for questions of interoperability between LWC and the original Aura-based lightning components.

Filter by
Sorted by
Tagged with
0 votes
0 answers
10 views

Pre populate fields in lightning-record-edit-form in lwc irrespective of the record page

I have a lightning-button which onclick will show a lightning-record-edit-form to create a Case which contains 2 lookup fields AccountId (Lookup to Account) Opportunity__c (Lookup to Opportunity) I ...
tycoon's user avatar
  • 3
0 votes
0 answers
16 views

Next button not navigating if clicking delete button on each row

How to navigate to next page even if user deletes a row in a data table
user142011's user avatar
1 vote
0 answers
25 views

notifyRecordUpdateAvailable vs RefreshApex vs RefreshView API

RefreshApex works for me so far in almost every case. I'd like to understand why I would instead use notifyRecordUpdateAvailable or the RefreshView API instead. Or am I horribly misunderstanding the ...
Ethan's user avatar
  • 21
1 vote
0 answers
26 views

graphQl issue: OR condition not working

I'm having an issue with an Or condition in my graphql statement. It returns all orders where the Order_Status__c field is 'Quote', but not 'Waitlisted'. There are no errors, just the additional ...
Michael Sobczak's user avatar
-1 votes
0 answers
21 views

My Lightning Record Page for a custom object Patient__c. After some commits my record detail page refuses to load and gives this error

Uncaught (in promise) DOMException: Failed to execute 'structuredClone' on 'Window': #<Object> could not be cloned. at V.wiredFlexipageTemplate (https://ruby-data-6093-dev-ed.scratch....
Anirudh Navin's user avatar
0 votes
0 answers
24 views

Record Id is not populating to LWC in Record Page in Community (Experience Cloud)

I have a problem capturing the record id from a record page in communities. I followed Get RecordId in LWC From Community Page intructions but it's not working for me and i saw that is not working for ...
David Ignacio Conde's user avatar
1 vote
1 answer
35 views

Share Content Version to Admin Users

I am creating my file using the following code: ContentVersion cv = new ContentVersion(); cv.VersionData = pdfContent; cv.Title = fileName; cv.PathOnClient = filename; cv.Description = 'to-be-...
Carl Ortiz's user avatar
1 vote
0 answers
21 views

Issue with ConnectAPI.NamedCredential Class

I am trying to utilize the NamedCredential Class. The getNamedCredential method works but the getExternalCredential method does not. I am able to see the external data from the named credential call ...
Mac Nosek's user avatar
1 vote
1 answer
24 views

LWC Invalid Mutation error when copying data from a @api property

I am passing data from the flow to the lwc component, making a copy of it and then adding a new key-value pair to each item in the array. The below code does not produce any errors but it doesn't work ...
sumchans's user avatar
  • 643
0 votes
0 answers
25 views

The state of radiobutton is not stable in LWC. I have created a timer function, when the timer function is over then the value is getting fixed

html part <template for:each={wrongAndRightAns} for:item="answer"> <div class="grid-item" key={answer.key}> <label><input type="radio" ...
Hadi Husain's user avatar
-1 votes
0 answers
39 views

Navigate from one page to another page in Aura site

We have 2 pages on Aura site, Page A, Page B. Both page have an LWC component. Page A, has lwc component that has button, on that button click I want to redirect to a new window which should open Page ...
Ankuli's user avatar
  • 724
4 votes
2 answers
205 views

How to prevent LWC Wire from loading data automatically?

I would like to prevent the @wire function from loading automatically on initialization and instead load it on command. Currently I am using refreshApex() now to load it on command, but I don't want ...
Z0q's user avatar
  • 155
0 votes
0 answers
36 views

PDF from URL is not opening in Modal POP UP in LWC

I have requirement when I click on button it opens the POP up and in that PDF get loaded from URL within that pop up and on close button pop up get closed. So below is my code it is working fine on ...
MANISH JADHAV's user avatar
0 votes
1 answer
27 views

Place lightning-input message next to element

I'm using this one to display <div class="slds-grid slds-wrap"> <div class="slds-form-element"> <label class="slds-checkbox_toggle slds-grid"&...
pincet's user avatar
  • 839
0 votes
0 answers
38 views

LWC custom Tree Grid Generation

I am trying to create custom tree grid component because of some limitation of standard salesforce lightning-tree-grid. The requirement is based on the data custom tree should automatically generate ...
Ranjit Mishra's user avatar
0 votes
1 answer
22 views

lightning-input type="toggle" change label font

Is it possible to do it? <lightning-input class="cxd-toggle__label-medium" type="toggle" label="Block list" checked={...
pincet's user avatar
  • 839
-1 votes
0 answers
29 views

Navigate to a particular step in an omniscript using lwc not working

handle next() { this.OmniNavigateTo(ActionStep); }
user142011's user avatar
0 votes
0 answers
38 views

Update Custom Datatable LWC Whenever Related ContentNote is Created/ Updated

I have created a custom datatable to display contentnotes related to an account record. I would like this table to update whenever a new contentnote related to the account record is created or updated....
spal's user avatar
  • 53
1 vote
1 answer
48 views

Downloaded data in excel format using LWC in salesforce. When i open the file it shows warning prompt: File format and extension do not match

Hi, Currently iam implementing functionality of downloading data using LWC by using following code: let doc = '<table>'; // Add styles for the table doc += '<style>'; doc +...
Murali AS's user avatar
0 votes
0 answers
21 views

Page is showing blank in salesforce energy and utility cloud

In Salesforce Energey and Utility cloud, when I am setup the customer account after filling the forms, when I click on Confirm Move In, button, it opens up the page, where I have to fill the details ...
Harry's user avatar
  • 1
-2 votes
1 answer
29 views

Floating window in Salesforce account

Looking at extending the New Task quick action (to a new LWC where the new LWC is floating and persisted when user navigates between screens. Thanks, Sumeet Agarkar
Sumeet Agarkar's user avatar
0 votes
0 answers
37 views

LWC Component when deployed to source not showing the updated UI

I have the below code which does not match with what I see in the UI. When deploying the source to the org I see the status as success but I dont see the changes in the UI. <template lwc:if={...
sumchans's user avatar
  • 643
0 votes
1 answer
52 views

How to clear LWC lightning-textarea in javascript

I have an lwc with a simple form which includes a few checkboxes and two selects and one textarea. My submit function does a callout, and then clears the inputs. The rest of the inputs are cleared, ...
hgolov's user avatar
  • 723
0 votes
1 answer
38 views

How to determine when Queue is complete on LWC

I'm currently trying to create a tool that creates a metadata record in LWC. I'm using Metadata.Operators.enqueueDeployment(mdContainer, new DeployCallback()) to create a new record, and it's able to ...
Kevin Yao's user avatar
0 votes
0 answers
120 views

LWC: upload and process a CSV

I am developing a Lightning Web Component that uses the Bulk API 2.0 to insert a large amount of data to Salesforce, exposing the functionality to non-technical users without access to the Setup. So ...
Fabio Barcelona's user avatar
0 votes
0 answers
47 views

Is it possible to create an lwc that other lwcs can be drag and dropped into?

I would like to create an LWC (lets call it the Parent LWC) that is usable within the Flow builder. When Parent LWC is dragged onto a Flow screen, I'd like for the user to be able to drag other Flow ...
CloudHugger's user avatar
  • 1,709
0 votes
1 answer
38 views

Dynamic lightning-button-menu causing infinite loop

I have a lightning-button-menu in my lwc whos options are dynamic based on each record displayed, based on an change data capture its possible that the options will change when the user is viewing (...
ravent's user avatar
  • 3
-1 votes
0 answers
22 views

refreshapex not working in my component

import { LightningElement, api, track, wire } from 'lwc'; import getRelatedFilesByRecordId from '@salesforce/apex/DocOverview.getRelatedFilesByRecordId' import savemapping from '@salesforce/apex/...
Harsh pratap singh's user avatar
0 votes
1 answer
26 views

Navigate to LWR Community Home Page

I have pretty simple Custom Modal LWC. I want it to navigate to Customer Portal Home Page onclose of the modal. Below is the code: import LightningModal from 'lightning/modal'; import {NavigationMixin}...
Vladimir Egikyan's user avatar
0 votes
0 answers
31 views

how i can get task object record in lwc without calling apex and use in community cloud?

I've created a lwc componnent and i'm using this component in my community site so i want to get task records in js only(without calling apex) Note:- tried graphQL already but its doesnt work with ...
Nitin Sen's user avatar
-1 votes
0 answers
30 views

How to Access Internationalization Properties in LWC Component?

I have created a sample LWC component and trying to use Internationalization Properties to change the LWC component's viewing language from English to any end-user language. I have followed this ...
Parvez Alam's user avatar
0 votes
0 answers
22 views

LWC Object converted to Proxy [duplicate]

I am calling my Apex controller from connectedCallback and assigning a variable the value od data wich is returned by method. I am able to view the data when it is returned correctly in component but ...
Ishan's user avatar
  • 537
0 votes
0 answers
30 views

Migration from Aura Site to LWR

We are migrating our Aura site to o LWR Site and we encountered some "porting" problems between the two sites. Embedded chat is not supported on LWR Topics and articles cannot be used as i ...
stackusiastic's user avatar
1 vote
0 answers
29 views

Leaflet is not working correctly in Mozilla Firefox browser when LWS is enabled in Salesforce

In Salesforce to show the map with pointers I created custom LWC and use Leaflet.js library but there is an issue with LWS and Mozilla Firefox. When LWS is enabled then in Mozilla Firefox browser ...
Ярослав Пажух's user avatar
-1 votes
1 answer
41 views

Redirect to 'create new record' page from flow

I have scenario where I have designed a flow that when new button clicked on A1, A2 or A3 object's, flow ask questions and then creates record for A1, A2 or A3 based on asnwer. As soon as user click ...
Komal Jain's user avatar
0 votes
0 answers
46 views

Why I am getting padding of 2px in my Lightning-radio-group element's all the radio button except first radio in LWC in salesforce?

CSS: .vertical-radio-group { display: flex; flex-direction: column; align-items: flex-start; margin-left: var(--slds-c-lightning-radio-group-spacing-inline-start, 0rem); } .slds-radio { ...
Sanu Singh's user avatar
0 votes
1 answer
35 views

Lightning layout issue when containing accordion

Im having an issue with lightning-layout / lightning-layout-item when the item contains an accordion, if I give an accordion a very long label (that exceeds the container) by default SF should ...
ravent's user avatar
  • 3
0 votes
0 answers
37 views

Lightning button no action and not clickable

In my Case detail page there is a button Reopen Case, but the button is visible only when case status is completed. Currently I'm working on a case which has the status Completed, Now Reopen case ...
Raghu's user avatar
  • 41
0 votes
1 answer
57 views

How can I refresh a child component from its grandparent?

I have LWC 3 components, grandparent, parent, child. grandparent should get records of Assignment__c. For each Assignment__c, we display a parent instance. parent gets records of Timecard__c and for ...
Luke Bray's user avatar
  • 506
0 votes
1 answer
26 views

Account deletion job based on object relations

I have a requirement for creating a job for deleting the accounts that do not have related cases, opportunity, Lead. The 3 objects can also change in future and new object to be checked can be added ...
user15754268's user avatar
0 votes
0 answers
19 views

Can an LWC access a cookie set in a different domain?

I have a customer who runs a support site via a Digital Experience. They are interested in setting a cookie in their website (www.example.com) and have it be available to a Lightning Web Component in ...
Jack Odell's user avatar
0 votes
1 answer
33 views

Wrap LWC in Aura so it can be opened on click of a button in a pop-up window

I have created the following LWC that creates a record on a custom object. I want to create a button on the custom object list view page, and I want this LWC to open in a pop-up window. It is not ...
Goat123's user avatar
1 vote
1 answer
85 views

I need to get Lightning page name using lwc

I need to get Lightning page name where I placed my lwc component, Suppose if place my lwc in record page and lightning page name is "accountpage" the page name i have to get in lwc
Abdul's user avatar
  • 21
1 vote
1 answer
28 views

Quick Action for LightningWebComponent not Possible for Task SObject

I want to create a quick action of type LightningWebComponent for SObject Task. However, when I deploy the quick action I run into error: Lightning Web Component quick actions are not supported for ...
PieterJacob's user avatar
-2 votes
0 answers
42 views

Is there a way to retrieve a list of search results from Account SObject via a form?

I am looking at creating a form that can retrieve a list of rows for a LWC Datatable. Usually I use an apex method to call out to an API, but for this I need to utilize the account sobject. For this ...
Tristan Berger's user avatar
0 votes
0 answers
32 views

Create Header Actions dynamically in lightning Datatable

In the documentation provided by Salesforce on the 'Datatable' component we find the necessary instructions (see section 'Creating Header Actions') to create actions at header level. It is also ...
Tzinm's user avatar
  • 1
-2 votes
1 answer
65 views

LWC navigate to the record detail page after creation

I want to navigate to the record detail page after it has been created using the lightning web component. HTML: <template> <lightning-card title="Create Tender Tracker Support Case&...
Speenzar XaXai's user avatar
-1 votes
0 answers
20 views

Cancel and update StageName for opportunity lwc

i want when i click cancel close modelpopup and update opportunity status to closed import { LightningElement, api} from 'lwc'; import OPP_OBJECT from '@salesforce/schema/Opportunity'; import OPP_ID ...
Mostafa Agourri's user avatar
0 votes
0 answers
46 views

TypeError: Cannot read properties of undefined (reading 'value')

I'm trying to display some dependent field once case details page is loading but based on logic which i written that is working for admin only If i login with community portal user case details page ...
Basha's user avatar
  • 3
0 votes
1 answer
34 views

Can I get the aura component code for resizable div

LWC code: <template> <section class="resizeable-container" onmouseup={handleOnMouseUp} onmousemove={handleOnMouseMove}> <div class="resizeable-item blue"&...
kunal kashyap's user avatar

1
2 3 4 5
169