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
7 views

LWC Apex controller not returning record as expected

In the logs, you can see siteSurveyId prints, but the query return nothing. When I hardcode the Id in the query (bypassing siteSurveyId variable), it returns the record as expected. I already tried ...
1
vote
1answer
16 views

Unicode inside LWC ComboBox Values

I have a requirement to add the registered TM symbol in superscript to some LWC combo box menus. The options array that you pass into the combo box does not seem to support any sort of String ...
0
votes
0answers
18 views

Capture auto logout due to inactivity in Salesforce

I need to display some alerts when user is getting logged-out of Salesforce due to inactivity. Can someone please share some thoughts on how this can be achieved?
0
votes
1answer
24 views

refresh LWC page when editing or created a related record

On the Account record page, I want to refresh my LWC page whenever I create or edit a related contact record. My LWC page is fetching list records from apex not using LDS. I couldn't think of any way ...
0
votes
0answers
21 views

Salesfoce truncating query parameters

We are trying to integrate google API in our application. By following some articles we successfully implemented it but during redirection from google we are getting code and scope as return parameter ...
0
votes
0answers
35 views

LWC @wire method is not being called

I have @wire method in LWC which has one parameter as account id and displays all the related contacts . I am calling this LWC from aura component which is working fine . I have other scenario where I ...
0
votes
0answers
17 views

Adding new lookup to Omnichannel prechat: trying workarounds

I was asked to insert a prechat form, for the community omni-channel, and include 2 lookup fields for the Case created: contact of the user starting the chat. This Contact should be mapped to User....
-1
votes
1answer
39 views

Unable to insert contact record on button click using lwc and apex controller [closed]

Button is created in quick action bar on an account record. HTML FILE <template> <lightning-card title="New contact" icon-name="standard:contact"> <...
0
votes
1answer
29 views

how to navigate the lead conversion page from lwc? [closed]

here is my code `this[NavigationMixin.Navigate]({ type: 'standard__recordPage', attributes: { recordId:this.recordId, objectApiName: 'Lead', ...
0
votes
0answers
22 views

Why the lwc and aura component is not loading in VF page

I have a VF page <apex:page showHeader="false" sidebar="false" controller="home_abk_controller"> <apex:includeLightning /> <div style="{!IF (...
1
vote
0answers
35 views

Can I bold the last three lines of “lightning-datatable” in a LWC?

//html <div class="last-row-bold"> <lightning-datatable class="slds-table_striped" key-field="Id" data={dataForDisplay} ...
0
votes
0answers
21 views

Custom Article View via Lightning Web Component for Lightning Experience

I am trying to understand how to setup data in a way to display it in my lighting experience builder. I am able to retrieve the recordId but presently cannot seem to get any of the other fields to ...
0
votes
0answers
14 views

How to create custom filter list on status picklist in LWC [duplicate]

I have created custom lightning app in which displaying different object data using wrapper class on single datatable.There are 2 columns like Banking, corporate which displays the status like ...
1
vote
1answer
29 views

LWC Accordian Component labels

I'm pretty new to development in general, but I'm trying to implement an LWC (accordian) that pulls the label from 2 different fields within our SFDC. The issue that I'm having is that when I click on ...
0
votes
0answers
29 views

Undefined values when Passing Ids from Salesforce Flows to LWC component

I am launching a LWC component from a Screenflow. When I first launch the screenflow by clearing cache , the flow is not passing the ids correctly. When I reload the page the flow is passing the ids ...
0
votes
0answers
16 views

How to navigate to in same tab and in same console app if used data table url [closed]

I am using data table to fetch data. And using url for navigation. Used below snippet of code its opening in new tab I want to open it in same tab. Can anyone pls help with this. We are using console ...
0
votes
1answer
11 views

Is it possible to use External package while developing appExchange app

I am new to salesforce ecosystem and I am trying to make my first appExchange app but I am wondering if it is possible to use an external package like lwc-router while developing an application for ...
2
votes
1answer
67 views

JS/LWC: Property of undefined error

I'm a seasoned SFDC Dev, but fairly new to JS. I've read several documentations (Trailhead, Mozilla, ES6, W3) on JS since yesterday, trying to figure this out. Why is this line... this....
0
votes
1answer
19 views

Show/Hide LWC Design attributes based on the value of another design attribute on builder page Salesforce

I have an App builder page and I am using Design attributes to pass on values from Lightning page to LWC component. However, Is there is any way that I can show/hide my Design attribute field on app ...
0
votes
1answer
20 views

How to populate lightning-datatable depending on which lightning button (with onclick handler) is clicked on?

I created a LeadsContoller with multiple methods each returning a list of leads via a SOQL Query. I created multiple lightning buttons in HTML each with an onclick handler. In the JS file, i imported ...
0
votes
1answer
22 views

Why is the selected value not displayed in the “lightning-combobox”?

//html <lightning-combobox name="selectedYear" value={currentYear} placeholder="Select Year" options={...
-1
votes
0answers
28 views

need to manipulate the lightning-tree-grid, using this component for the user to make any changes [closed]

this.gridData = [ { name: '123556', GroupName: 'Ungrouped sites', _children: [ { name: '123556-...
1
vote
0answers
38 views

Modify lightning-tree to work like lightning-tabset

I have an application that utilises mix of nested tabsets and trees - see this playground: https://webcomponents.dev/edit/vXwtMddn7CcREzy4KXK4 I'd like lightning-tree to behave more like lightning-...
1
vote
4answers
64 views

LWC data shows in console, but for:each fails to display it

I'm simply trying to display a list of queried Activities here records. Next, I'll add checkboxes to each. See screenshot here: the Activities card should display the 6 records as seen in the console. ...
-1
votes
0answers
27 views

how to delete selected row from a lightning tree grid component [closed]

Need to delete rows/child nodes from lightning-tree-grid and add it to another parent level:1 node. Is that possible?
0
votes
1answer
29 views

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

Hopefully this is a simple typo somewhere that I just can't find, but I have a very simple LWC in a community to just get some record data, and the getRecord wire adapter isn't executing as recordId ...
0
votes
0answers
19 views

how to display json data using lwc in model popup which will open on button clicked. can some one help me for resolving the issue [closed]

displayJson.js import { LightningElement,track,api } from 'lwc'; import {EXAMPLES_COLUMNS_DEFINITION_BASIC,EXAMPLES_DATA_BASIC} from './sampleData'; export default class DisplayJSON extends ...
0
votes
1answer
20 views

not able to click on slds input icon

Below is the HTML <div class="slds-form-element"> <label class="slds-form-element__label" for="combobox-id-3">Relate To</label> <...
1
vote
1answer
42 views

base vs Narrow in lightning-card in LWC

I am new to LWC and trying to understand the concepts. In lightning-card, as per the documentation, the variant can be base(which is default) or Narrow. But from the below code, the output is same for ...
1
vote
2answers
39 views

LWC @wired isn't calling the Apex Controller

I'm simply trying to get a list of EventActivities from the Apex Controller and feed them to the HTML. No apparent errors, but the records are not showing on the front-end. I've been at this for some ...
1
vote
1answer
50 views

Unable to run a LWC Jest test for a custom LWC that uses lightning-quick-action-panel or CloseActionScreenEvent

I get this error: Cannot find module 'lightning/quickActionPanel' when running this Jest test: import { createElement } from 'lwc'; import DuplicateScreenAction from 'c/duplicateScreenAction'; let ...
0
votes
0answers
10 views

How to add createby,name in datatable [duplicate]

I want to add CreatedBy.Name in the data table. Can anyone help me with this? I am getting blank in Created By column in data table js: const columns = [ {label: 'Title', fieldName: 'Subject', type: ...
0
votes
1answer
34 views

Community scoped variables in Salesforce Portals

Scenario: I have some Lightning Web Components that I'm sharing across 2 different Communities oriented to 2 different group of external users. In order to differentiate the behavior of the components ...
0
votes
0answers
19 views

Is there a way to invoke AuraEnabled methods form browser's dev tools?

as title states I am looking for a way to invoke aura enabled functions by using only browser capabilities not via javascript written inside org, especially in lwc context. In the end when we add a ...
2
votes
1answer
52 views

Markup to present a spinner in a lightning-quick-action-panel quick action?

Now that quick actions can be created using LWCs, the lightning-quick-action-panel component makes consistent styling easy: <template> <lightning-quick-action-panel header={headerText}>...
0
votes
0answers
16 views

Sending an event when window.location.href changes

My setup: I have a LWC which is placed in Shared Footer, so I don't have to add it manually on every page. This component is responsible only for sending events. What problems do I have: I need to do ...
0
votes
1answer
26 views

Extra textbox before input component

It seems that there's an extra textbox that I can type into, but I'm not sure what's causing it in the code. I only get to this extra textbox when tabbing through elements on the page. I have added ...
2
votes
0answers
34 views

tooltip / lightning helptext appears in wrong location, misaligned

I have a fairly simple template: <template> <div> Some text here <lightning-helptext content="I am incorrectly aligned"></lightning-helptext> &...
1
vote
1answer
25 views

How to Dynamically Change Text Based on User Input

I am fairly new to SF, and I am only moderately well-versed in JS in general. I am attempting to create a LWC that will display a URL based on user input. This URL will eventually be used to retrieve ...
0
votes
1answer
54 views

How to call imperative apex method from connectedCallback() in LWC

I want to call an imperative method in connectedCallback() because at the time of lwc loading I want to prepopulate some data into lwc. I am returning wrapper class data from the apex. Trying the ...
0
votes
0answers
24 views

Lightning Datatable does not properly resize when inside grid (flexbox)

Normally the width of a <lightning-datatable> changes dynamically as you change the width of the browser. However, When I put a <lightning-datatable> inside a grid (<div class="...
0
votes
1answer
22 views

wire function is not executing all time

I am trying to get some apex data when component is loading. For this I have added my logic into two different wire adapter inside the JS. but the 2nd wire function is not getting executed always. if ...
0
votes
1answer
46 views

Is there a way to alter binded UI data?

Lets say I have searchResult.zipCode and I want to alter the data in it before it is rendered because it returns a full zip code and not the first 5 digits of it, like how we regularly use zip-codes. ...
0
votes
1answer
32 views

Open a lightning web component using custom button on related list [closed]

Hi everyone I have this requirement where I have to call a lightning web component by clicking on a custom button on the related list. Little confused, can this be achieved? As seen in the below ...
0
votes
0answers
43 views

Why are the column names of my table not displayed? [closed]

//html <lightning-datatable key-field="Id" data={dataForDisplay} hide-checkbox-column columns={columns}> </lightning-...
0
votes
0answers
44 views

Weather API callout issues

I am currently working on creating a prototype LWC that gives weather information for a given location. The location is being provided via user input. For some cities, it works fine - as in the case ...
3
votes
1answer
59 views

How to let extension packages customize UI of base package

Salesforce is bringing out a lot of new things to make Lightning UI more flexible: Dynamic Forms, Dynamic Interactions, etc. But they are not ISV-friendly because they are based on Flexipages. And ...
0
votes
1answer
19 views

wired issue with placeHolder of the lightning-output-field in lwc

I'm using lightning-output-field to output some of my record's field. It is known that if a field's type is lookup, the component of the field input will have a placeHolder which says 'Searching ...
0
votes
1answer
39 views

LWC refresh data each time a new record is inserted

I have a custom lwc that has a wire call that retrieves a list of records and some required information to be displayed: @AuraEnabled(Cacheable=true) public static InterPlanetaryCasesController....
0
votes
1answer
41 views

Lightning-record-edit-form edit functionality not working

I'm creating a record in lightning record-edit -form then in the handle success of my parent component i'm calling a child component to edit some fields of that record and passing the recordId of the ...

1
2 3 4 5
103