Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

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
1 answer
14 views

My LWC comes up as Object object in communities but works in lightning apps page

I have created this custom LWC to bring back some data from a custom object but for some reason when I return the data in a Community page I get: When its a lightning component on a home page it ...
user avatar
0 votes
0 answers
15 views

Scoped imports not allowed when a runtime namespace is specified

I'm having a error message in the org after creation of cls file. I do have a custom namespace in the xml. Any idea? This page has an error. You might just need to refresh it. Error in $A.getCallback(...
user avatar
  • 93
0 votes
1 answer
15 views

how to call two functions in one onclick in lwc?

I am very new to LWC and Javascript. I have an LWC component with a ightning-input tag with "type=search" and one button with onclick event. When I searched for a keyword, I was supposed to ...
user avatar
0 votes
0 answers
30 views

LMS Pub-Sub between Flow Aura Container and LWC component fails

I'm confronting the issue that the last subscription from LWC fails without any error. Since I needed to pass a complicated object between screen components on different steps in Flow (which are not ...
user avatar
0 votes
0 answers
12 views

lightning-data table styling

I have an lwc that is used to display a lightning-input in a lightning-datatable. I cannot get it to look right. showProducts.js (parent lwc) import { LightningElement, wire, track } from 'lwc'; ...
user avatar
  • 443
0 votes
0 answers
10 views

LWC - Base64(image) to Files in Person Account

Hey I'm trying to upload an image file in LWC by using base64 into files in person account using linked entity ID. This code is quite straightforward as it is. Asking for camera access in the ...
user avatar
  • 93
0 votes
0 answers
27 views

Embedded LWC in Aura Component not loading on QUICK action

I am trying to create a Quick action on Quote object, as LWC quick actions are not supported on Quote object trying to embed the LWC component in a AURA component and use AURA to tag to QUICK action. ...
user avatar
  • 1,439
2 votes
2 answers
58 views

Create an reactive auxiliary class in the LWC component

I've tried to create auxiliary classes in the component folder to divide logic into smaller parts, but I can't make the data on the page refresh. for example: Example file structure: component/ |-...
user avatar
  • 21
0 votes
0 answers
34 views

Issue with @AuraEnabled(cacheable=true)

I had an apex method with @AuraEnabled(cacheable=true) and a wire method in LWC, all was working fine. Then to meet the new requirement I was experimenting with @AuraEnabled(cacheable=false). With ...
user avatar
1 vote
0 answers
18 views

LWC spinner removes filter values

I have this page that displays a list of clients which can be filtered based on 4 fields. Because data retrieval took quite a while, so I have decided to add a spinner. However it seems that now the ...
user avatar
0 votes
0 answers
23 views

Pass Complicated JSON between Flow and LWC, or from LWC Screen Component in Flow to another LWC Screen Component (in another step)

Hello all clever SFDC Developers, I wonder is there any way I can pass a collection of Apex-defined from Flow to Screen, working with property type and property in the typeconfig of corresponding LWC ...
user avatar
1 vote
0 answers
10 views

Invoke channel menu from lightning web components

I've 3 different embedded service deployments / channel menu's that are being used for different page variations depending on the type of logged in user on experience cloud. However, as we cannot use ...
user avatar
  • 474
-2 votes
0 answers
24 views

Is there a way to monitor clicks on a lwc from Event Logs except ApexExecution event type?

Can we track clicks made on a lightning web component from the Event Logs? I don't want to do an apex call to monitor the click.
user avatar
0 votes
0 answers
29 views

How to create the field lookup component in LWC [closed]

I want to create a lookup component for fields in LWC as shown in the image below. Is there any existing component for this or do I have to develop one from scratch?
user avatar
0 votes
0 answers
29 views

How do I implement a CRUD Operation in Custom UI?

<lightning-record-edit-form record-id="b6B8A000000LBp1QAW" object-api-name="CBProgram__c"> <lightning-layout multiple-rows> <lightning-layout-item size=&...
user avatar
0 votes
0 answers
19 views

How to do a custom dependent picklist with combo box

For a LWC I have two combo box inputs lets say input A and input B. Input A has 2 values (value 1 & value 2) and input B has 2 values (value 3 and value 4). how can I restrict the behavior of ...
user avatar
  • 63
1 vote
0 answers
35 views

Field Permissions on ContentVersionHistory

I'm trying to display field history for some custom fields on the ContentVersion object. This object has some interesting properties, one of which is that field security cannot be explicitly set on ...
user avatar
1 vote
1 answer
12 views

Lightning Dual Listbox style

With this code and as you see in the image, I have a mismatch between the box that contains my list and the Selected one, how can I fix this? I want also to add some space between the list box and the ...
user avatar
0 votes
0 answers
24 views

can not connect salesforce LWC and fullCalendar V5

I know that this question has already been asked here - stackExchange The change which has been suggested, in the fullCalendar library is I think already has been implemented in it by FullCalendar ...
user avatar
  • 1
1 vote
0 answers
43 views

Unable to load DHTMLX Spreadsheet JS into LWC

Background I am trying to use DHTMLX Spreadsheet in an LWC I've added the JS and CSS as Static Resources: DHTMLX_Spreadsheet_JS DHTMLX_Spreadsheet_CSS And I have enabled Use Lightning Web Security ...
user avatar
  • 8,223
0 votes
0 answers
17 views

Resolve PMD:Validate CRUD permission before SOQL/DML operation on Dynamic SObject

I'm familiar with resolving this pmd violation when the object is known and can be checked like if (Account.SObjectType.getDescribe().isupdateable()) {} but what if the Object is not known before ...
user avatar
0 votes
0 answers
14 views

Multiple components using the same Lightning Messaging Service

I have two different parent components that use the same lightning messaging channel. These components do the same thing in terms of behavior. Both components implement the same child component. The ...
user avatar
-3 votes
0 answers
21 views

how to achieve my below scenario in LWC? please help

example: I have a combobox in iteration, if I select a value in 1st one, then all the other combobox's in the iteration has to be selected with that specific value. how to achieve this in LWC?
user avatar
0 votes
0 answers
7 views

How can i add lightning:select in recordEditForm's one of input field?

How can i added lightning:select in recordEditForm's one of input field which is the simple input field? Can i change field from input to select in recordEditForm? This is input field from lightning:...
user avatar
0 votes
1 answer
30 views

lightning message service not working

I'm using Lightning message service to pass message from LWC to another LWC.Both components are custom components used in community pages. The message is not being sent to the other component. ...
user avatar
0 votes
1 answer
15 views

For lighning:recordEditForm

I want to part 2 columns in my record edit form because it has too many fields.
user avatar
0 votes
1 answer
23 views

How to Refresh or re render DIV in lwc

I have an attachment button that works fine. Now I want to cancel button which cancels the uploaded file. For this, I need to re-render the div by clicking the cancel button. How ?.IS there is better ...
user avatar
  • 1
0 votes
0 answers
10 views

LWC jsPDF-autoTable plugin not working as expected

I am importing both the cdn static resources for jsPDF and the jsPDF-autoTable plugin. Here is how I am loading it in: import { LightningElement } from 'lwc'; import { loadScript } from 'lightning/...
user avatar
0 votes
1 answer
36 views

How can I get the lightning-button-menu to display above other components

I'm creating custom table, row, and cell LWC components. The lightning-menu-item options display under other components no matter what I try. I've been adjusting the display and position values of all ...
user avatar
0 votes
0 answers
27 views

display data from Lookup field LWC

Hi everybody I am doing a form with LWC that show some fields from one object and some fields from other object. For example: *First Object: EntregableCurso_c: (fields): Name: Practica6 Type: practica ...
user avatar
0 votes
1 answer
20 views

Open standard new record page from lightning flow

I have a flow on new button of an object to collect some user details. Once user details are entered by user, I want to open standard record create page with details from flow prepopulated. Values ...
user avatar
0 votes
1 answer
30 views

System.DmlException: Insert failed. First exception on row 0; first error: FIELD_CUSTOM_VALIDATION_EXCEPTION, Duplicate actives is not Allowed : []c

apex class public with sharing class BringEmployeesAble { public List<Project_skill__c> contactList {get;set;} public BringEmployeesAble(){ this.contactList = new List<...
user avatar
-1 votes
0 answers
23 views

Display multiple records dynamically in a Lightning Record Edit Form [closed]

I have a requirement for displaying multiple records dynamically in a Lightning Record Edit Form. I am passing in a collection of records from a Flow into a LWC which displays the Lightning Record ...
user avatar
  • 1
2 votes
1 answer
22 views

LWC - getObjectInfo not working

I am trying to get all the record type options for Opportunity. I am using getObjectInfo directly copied from the documentation but I keep getting the same error: Documentation: https://developer....
user avatar
0 votes
1 answer
15 views

How to access an Apex Map in LWC JS

In Apex I have a map of Map<Address__c, List<Mortgage_Account__c>>(); and I am parsing this and getting it in an LWC, mortgageSummary. Here is mortgageSummary.js: import { LightningElement,...
user avatar
  • 368
-1 votes
0 answers
26 views

Meta tag in Lightning Web Component [closed]

I am trying to find a way to add a Meta tag inside a LWC, but can't find any helpful article except the LWR feature on Experience cloud. Is there any other way out to include such changes in the head ...
user avatar
0 votes
0 answers
26 views

Clean URLs with any SF site

I'm looking for a way to have normal, clean urls for my SalesForce site. This could be either with Lightning Web Components or VisualForce or something else. I have not started building the project ...
user avatar
-2 votes
1 answer
54 views

How to import custom object fields in LWC js file [closed]

I dont find any standard documentation on importing custom object and its field to import in lwc js. Like how do we even import custom obect's picklist and show them on frontend?
user avatar
0 votes
1 answer
17 views

Refresh Lightning Output Field on Record Update

I am displaying a custom field through a lightning output field, this works great until I update the field value through Apex. (I am using a modal and a combo box to achieve this) The field is ...
user avatar
0 votes
1 answer
21 views

LWC - Check checkbox won't work

Simple question. This won't work - It won't check my checkbox. Any solutions? html. <template> <lightning-input type="checkbox" data-id="none" label="None of the ...
user avatar
  • 93
0 votes
1 answer
27 views

Calling an LWC component inside another component

Greetings...... I have a question/doubt which I would like to clear. And I'm new to the Salesforce world so forgive me if it's a foolish question. Let's say i have component A for Account, B for User ...
user avatar
1 vote
1 answer
25 views

NavigationMixin not working on community

I want to navigate from lwc component firstComponent to a community page enerie test. FirstComponent import { NavigationMixin } from 'lightning/navigation'; export default class FicheNutrition1 ...
user avatar
1 vote
1 answer
29 views

Embed LWC component in visualforce page and load lwc component onclick of a button in classic

I want to call lwc component on click of a button in classic. I created a VF page and trying to embed lwc component. Below is my code VF Page <apex:page standardController="Account"> ...
user avatar
0 votes
0 answers
26 views

LWC navigation to a tab is showing the 'Loading...' even after refreshing multiple times [duplicate]

We are trying to open an LWC after clicking 'View All' on a related list LWC. But the tab name is showing 'Loading..' and is not updating even if we refresh it. We have tried checking if there is any ...
user avatar
  • 1
0 votes
1 answer
18 views

LWC show records

I have a list of records. I need to display each one with some record data. Each row has to have a radio button and a number input field. <radio> <number> --- Product1 Name --- ...
user avatar
  • 443
2 votes
3 answers
68 views

Spread Operator Usage in LwC

I have a javascript related question. I have the piece of code using a spread operator var arrObj = [{ name : "m"}, { name : "mb"}]; var arrObj1 = [...arrObj]; console.log(arrObj1);...
user avatar
  • 1,071
-1 votes
0 answers
23 views

How to show related objects field values along with that object field in lightning record edit form in LWC [closed]

If this is not possible , what should be the way to display those multiple objects field value in lwc html? I have one object Account. Account object has two related object-- Contact Point Email ...
user avatar
-1 votes
0 answers
20 views

Code for Community Cloud

My question begins with a controller: public with sharing class HandlerNavi { @AuraEnabled (cacheable = true) public static List<Evento__c> getEvento() { List<Evento__c> ...
user avatar
-1 votes
0 answers
34 views

Too many rows Exception

Can you please assist to debug below, while calling below method from Helper class into trigger, getting too many rows exception Thanks in advance public static void LeadAssign(List<Lead> ...
user avatar
  • 9
-1 votes
0 answers
34 views

Google Analytics with LWC in salesforce not working

Am working with LWC and getting Google Analysis for the cart which we have user has to navigate through 4-5 steps in cart all the steps are in LWC and i have added "https://www.google-analytics....
user avatar

1
2 3 4 5
130