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
0answers
8 views

Problem with generate pdf and content version

i need Generate PDF using LWC from Quick Action. pdfTemplate.page <apex:page renderAs="pdf" standardController="Account"> <h1>Account Details</h1> Dear {!...
0
votes
0answers
12 views

Error: value too long for field: source maximum length is:131072 [duplicate]

Error: value too long for field: source maximum length is:131072 Getting above error while deploying Lwc through VScode. Little help would be great. Thanks
0
votes
0answers
12 views

Restriction rules - which HTML markup tag is used?

I am currently testing the new Restriction Rules feature. I have a custom object called Construction and as I am creating the new Restriction Rule and adding a record criteria field, it happens that a ...
0
votes
1answer
15 views

display array list using lightning-datatable in html LWC

I tried to display my array using lightning-datatable with the below code. However, I can see the table and overview of datatable but no data is displayed in the table. Please help me to identify my ...
0
votes
1answer
16 views

Combining String Plus Variable Within Attribute In LWC Component

Is it possible to combine a string plus a variable in an attribute in a component? I'd like to concatenate "website.com?" with recordId to render https://website.com? 0018c0000289v0pAAA So ...
0
votes
1answer
29 views

Reinitialize Lightning Web Component after NavigationMixIn

I have an LWC template that has a parent and child template relationship. On the child template I am using the NavigationMixin.Navigate API to edit the record. When a user selects "Save", I ...
0
votes
0answers
15 views

How to destroy Parent Aura and Child LWC during record navigation?

I have overridden Standard New button on lead object with Aura Component and this Aura calls LWC which contains record edit form to create new lead record but here I am making a server call to create ...
0
votes
0answers
26 views

How do I send data from a Proxy to a function in LWC?

I'm trying to send a data of a response in a function like function(response) in my LWC, but the response is a Proxy container with format like Proxy {}[[Handler]]: En[[Target]]: Array(0)[[IsRevoked]]:...
1
vote
1answer
36 views

LWS - Apparent difference in behavior using data returned from Apex call

Prior to enabling LWS in Spring '22 we were able to successfully 'modify' objects returned from an Apex Call. After enabling LWS we cannot modify the data. Allow me to give an example. Below is some '...
0
votes
0answers
13 views

LWC - Refresh contents inside a single <lightning-tab>

I have a lightning-tabset with several lightning-tabs being created via a loop. Inside one of those tabs I'm displaying a form created by data pulled via Apex. For each record retrieved, a different ...
0
votes
0answers
15 views

Getting parent record id as undefined in SF1

There is a custom obj, and i am trying to create a record from it's related list and it has aura component embedded with LWC. Now, I need to get the parent record id while creating a record from ...
0
votes
1answer
41 views

Conditional Validation not working

I have a component for validation and a required flag. When the input field is not mandatory, The combo-box should throw me no error when i leave it as empty but i still want another validation on the ...
0
votes
0answers
18 views

LWC changes updates Aura, BUT Aura changes does not updates LWC

I have a scenario where two components an Aura and a LWC were included via Object Record Type. They are placed according to the image below. I'm facing a problem. All the interactions done in LWC ...
0
votes
0answers
13 views

Getting 404 not found error while importing the fullcalender library in LWC . Note : i am using the library from (https://fullcalendar.io/)

import { LightningElement ,track} from 'lwc'; import { loadScript, loadStyle } from 'lightning/platformResourceLoader'; import myCalender from "@salesforce/resourceUrl/myCalender"; import ...
1
vote
1answer
19 views

Frontend: get parent element of LWC component checkbox

I am quite new to SF development and as a frontend developer I am experiencing some striggles while taking over a project from a colleague who has just left his job. So please appologize any "...
0
votes
1answer
15 views

Error during LWC component connect phase: [Maximum call stack size exceeded]

I am trying to assign value to a property of my parent component's constructor method. Below is the html code: <template> {welcomes} <c-testfile></c-testfile> </template&...
0
votes
1answer
18 views

Unable to extract recordId from the lightning web component

I tried to get record id from the custom object "Categories__c" unfortunately it is not working. When I try the same with the custom recordId, it works. Can anyone help me to solve this ...
0
votes
0answers
27 views

Showing Account Details of Related Oppertunity and Contact in a singel LWC datatable

I want to display Contact Name and Opportunity Name and their related Account Details in a Single Table like this Name || Account Details ===============================================...
0
votes
1answer
45 views

Why is getAddressDetails() sending the return last?

I'm calling a Vlocity Integration Procedures by lwc when the user click in a simple button. I need to receive the addressRespose before any result to call other functions, but getAddressDetails() is ...
0
votes
0answers
21 views

Accordion-section

I am new to salesforce. I have a table with all the opportunities. How do I create an accordion where the name of the section is taken from the account and amount & opportunity of this account is ...
1
vote
1answer
20 views

Issue with lightning dataTable while fetching related record's field

I am getting the below error Cannot read properties of undefined (reading 'Name') The code for the LWC Component and controller is shown below. ContactController.cls public with sharing class ...
2
votes
0answers
18 views

Conditional Rendering with LWC Routing

I am trying to build a simple router for a SPA in Experience Cloud. I am fetching the properties for the next page with the State Pattern and storing the update pageState object. It is marked with @...
-1
votes
0answers
10 views

In LWC, when a validation errors occurs on the lightning quick action due to field dependency it's not jumped to field specific location

In LWC, Created a page with help of uirecord api. As soon as click on the "submit" button if an error occurs due to field dependency then the page should scroll to the field-specific ...
0
votes
0answers
51 views

Refresh my lwc page automatically without clicking the refresh button

Js: import { LightningElement,api,wire,track } from 'lwc'; import getDependentPicklistValues from '@salesforce/apex/Pathcontroller.getDependentPicklistValues'; //import { getObjectInfo } from '...
0
votes
0answers
19 views

How to fix the height of my Lightning card at the limit of the screen

I'm trying to fix the layout of my lightning-card, in the full screen of any screen like the card of salesforce page records. This is what i want to do equals: And this is my screen with the card: ...
0
votes
0answers
25 views

LWC lightning-tree-grid Remove Wrap Text/Clip Text Options from

I need some help in removing Wrap Text/Clip Text options for tree grid. I need to do it at least for Name column. The reason of that is that for some long names wrap option isn't working as expected -...
0
votes
0answers
15 views

User Interface API returning original field label instead of Translation Workbench Override's field label

We've overridden a Managed Package field's label (API Name: appnamespace__Units__c, label = Units) using Translation Workbench's Override option to Quantity. The updated field label shows up fine in a ...
-2
votes
0answers
25 views

Customizing LWC lightning-dual-listbox [duplicate]

I have a component that has a lightning-dual-listbox in it. Instead of selecting one item from left-side box and clicking on the right arrow to populate it to the right-side box, I want a double click ...
-2
votes
0answers
33 views

Download LWC as pdf [duplicate]

I would like to download the content of currently viewing lwc as a pdf. I have seen great answers to download a vf page as pdf from lwc etc but this is needed as per client requirement. Requirement is ...
0
votes
1answer
49 views

Wire Adapter not handling $recordId as reactive in LWC in Community

I have an LWC on a community which is working perfectly outside of the community but when ran on the community to pull the recordId from the url, it tries the wire with the initial blank value, then ...
0
votes
3answers
42 views

edit a particular row in a for:each loop lwc

I have below code where i have an array which i am iterating and displaying an input field of date type in readOnly like below Upon clicking of the edit icon i am trying to make the field editable. ...
0
votes
2answers
30 views

How can I change the output display in lightning app of sales force other than table?

I have created lwc for my custom object and I used lightning datatable for viewing it. Unfortunately I have lot of fields and hence, I would like to change the type of view. I tried using lightning ...
0
votes
2answers
36 views

Whats wrong with my Apex Class? It throws ERROR Please reference your WSDL or the describe call for the appropriate names

In Execute Anonymous it works fine Code: List<Room__c> c=[SELECT id,Name,Customer__c FROM Room__c]; System.debug(c); But in Apex Class it throws an error as Didn't understand relationship '...
0
votes
1answer
35 views

How to Show/Hide a field based on Picklist value In LWC?

I need to show a field called FixedAmount base on a picklist value and Hide based on another value of the same picklist. Can someone please review the code? It is just displaying for all values but ...
-1
votes
1answer
21 views

Update a JSON array on change

I am trying to update a JSON array on change of a value. I am able to find the position where we need to change but when I try to change the element value it shows a sorry interruption popup box. Does ...
0
votes
0answers
13 views

How to pass lightning-input-address field value to actual address field in LWC record edit form save?

I have created lightning-record-edit form component to create a new record. I have added code to display Input address field in the component. Below is the code that I have used: LWC HTML: <...
0
votes
1answer
37 views

LWC build Title component [closed]

In the process of developing an lwc component that can accept values such as Title, font size and icon name during LWC configuration and the padding and margins should be same as Salesforce out of the ...
0
votes
1answer
21 views

Remove the Asterisk from required

Is there any way that we can remove the required asterisk from required? <lightning-input class="searchInputCmp" name="enter-search" label={inputLabel} onchange={...
1
vote
2answers
28 views

Why is the table generating too many rows (LWC)?

As you can see in .js, the table has only 1 row, but it is generating 5 rows... I don't understand why. .js file import { LightningElement,track } from 'lwc'; export class Table extends ...
0
votes
1answer
20 views

How could I avoid nested for each in a HTML (LWC component)?

I'm starting to create a modal like in this picture, but I only got it doing nested for each (line 42 and 43 of the .html) for the table. That's not good practice, right? So how could avoid it? I ...
1
vote
1answer
27 views

Blank Visualforce Iframe in a LWC in Mobile App

We're trying to render a Screen Flow programatically from a LWC. This is done by creating an aura app (with lighting:flow) in an a Visualforce page. This Visualforce page is then loaded in an iframe ...
1
vote
1answer
31 views

How to refresh dependent dual listbox in LWC

The attached image is an LWC, in which Category is a controlling picklist (Combobox) and Sub Categ is the Dependent Picklist. Eg. Category 1: Sub Categ 1,2,3 Category 2: Sub Categ 2,3 I am storing ...
0
votes
1answer
28 views

How to iterate a JSON data in HTML in LWC

I have a JSON response 'result' from JS like below: [{"Name":"Alexy Portal", "Description":"New Record <span style="background-color:#FFFF00;">New<...
0
votes
1answer
16 views

Lwc I want to show the contact file ,opportunity file and account file on account level i have created but file not getting opened can anyone help me [closed]

HTML <template> <lightning-card title="File" icon-name="standard : Files"> <div class="slds‐m‐around_small"> <template if:true={...
1
vote
1answer
29 views

change lightning card background color depending upon field value

i want to change the background of the lightning CARD on the condition ,that when units.Available__c='NO' the card background should be red and when units.Available__c='yes' the card background should ...
0
votes
1answer
31 views

Send email using guest user

I have created an LWC with a form to create a Lead and placed it on the community site which is public. Now when a Lead is created there's a trigger that is supposed to run and send an email to the ...
0
votes
0answers
22 views

how to fetch boolean flag value from parent in child component

I have defined a flag in my child component and sent it as an attribute to parent. I need some of the input fields coming from parent to have some validation and according to the flag value (if true, ...
-3
votes
0answers
22 views

LWC File Related Issue [closed]

I want to display contact ,Opportunity file related to account using lwc please anyone help me
0
votes
1answer
38 views

How should i use setTimeout in this js code in lightning component so that popup opens after 2 min? [duplicate]

const isCookie = getCookie('pre-trial-survey'); if(!isCookie && IS_GUEST) { setCookie('pre-trial-survey', false, 30); this.showPopup=true; window.setTimeout(function() { }, 120000);//...
0
votes
0answers
24 views

NoErrorObjectAvailable Script error in my LWC

I read all question about this error and I cannot find the problem in my code. Here it is: HTML: <!-- ComboBox Main Guilds--> <lightning-vertical-navigation> ...

1
2 3 4 5
117