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

lightning-input-field label text alignment

I am using lightning-record-edit-form and I want all labels for records fields to be centered. I dont also want to hide all these labels, override them- like <label for="MobilePhone">...
user avatar
0 votes
1 answer
13 views

lightning tree grid issue with displaying grand child data from apex

I have this below query . Where i am trying to display Opportunity name and products associated to it in a lightning tree-grid structure. The issue i am facing is i am able to display opportunity name ...
user avatar
  • 1,528
0 votes
1 answer
23 views

In LWC JSON.parse(JSON.stringify(array)) not working as expected

I have an LWC that calls the backend, which makes a callout and returns the response wrapped inside an inner wrapper class with @AuraEnabled member variables and this wrapped class's @AuraEnabled ...
user avatar
  • 456
0 votes
1 answer
13 views

How to pass additional data to lightning-button-menu onselect handler?

Is there any way to pass additional data to a button-menu onselect hander? I have a lightning-button-menu in a loop (this is a minimal example, and not a real-world case). When a menu item is selected,...
user avatar
1 vote
0 answers
13 views

Cannot delete LWC: Validation_LWCDefinition

I'm trying to delete a LWC from my sandbox that is no longer needed and isn't referenced anywhere else. When I delete it, I'm getting this error message: Unable to Complete the Requested Change Your ...
user avatar
1 vote
1 answer
18 views

How to Get the Current Value from a Lightning-Input-Rich-Text

QUESTION(s) Is there a way to increase the polling rate of a lightning-input-rich-text field? OR Can I just get its current value without needing an onChange event? OR Can I force an onChange event ...
user avatar
0 votes
1 answer
22 views

Component visibility for LWC

I need your advice. I have custom LWC for tab and record page. For tab this component show accounts list with related oportunities. For record page it should show only this account and also it should ...
user avatar
  • 27
0 votes
0 answers
20 views

LWC: lightning-input checkbox disabled css

I am writing an LWC component where as per design received, need to customize lightning-input checkbox. Customized output: Code Used: I have used styling hooks as per documentation from salesforce to ...
user avatar
  • 101
0 votes
0 answers
11 views

LWC progress ring : remove dot circle and value inside

I am working on lightning-progress-ring, When i see progress ring in local server it's showing perfect. but in Org, there is a small circle appearing. Help required I want to get rid of this small ...
user avatar
  • 912
0 votes
0 answers
15 views

When i upload a new attachment and save, that file is not showing up immediately. Can i use Await and Async in this context?

I tried using Async and Await here, but it is not working. Can anybody help me here. import { LightningElement, api, track, wire } from 'lwc'; import getAttachments from '@salesforce/apex/...
user avatar
  • 35
0 votes
0 answers
14 views

How to open recordRelationshipPage in modal window

I have such NavigationMixin: handleRowActions(event) { const actionName = event.detail.action.name; const row = event.detail.row; const rowId = row.Id; switch (...
user avatar
  • 27
0 votes
1 answer
17 views

How to get geolocation using getRecord to show the mapMarkers?

pokemonLocation.html <template> <lightning-card title={cardTitle}> <lightning-map map-markers={mapMarkers} > </lightning-map> </lightning-card> </...
user avatar
0 votes
0 answers
17 views

Sending Email from Guest User Profile- Email No Receiving Email

I have created an LWC with a form by collecting the basic info, Then i will be sending the info to the email service. Below is the code string emailAddress = GetEmailServiceAddressUtility....
user avatar
0 votes
0 answers
23 views

Unable to fetch specific part of Apexlog using tooling API

public with sharing class FetchApex { @AuraEnabled public static void logs(){ ApexLog al = [SELECT FIELDS(all) FROM ApexLog WHERE LogUser.Name = 'Username' LIMIT 1]; String ...
user avatar
0 votes
0 answers
14 views

Migration VF with static resource to lightning component

I'm trying to migrate a visualforce page that loads scripts from static resources to a lightning component but getting a "could not find element 'app' to attach" error VF code: <apex:page ...
user avatar
  • 168
0 votes
1 answer
18 views

Don't see apex data

I have such code: JS @track messageBody; @wire(getDataFromController) emailTemplate ({ error, data }) { if (data) { this.messageBody = data[0].Body; //EmailTemplate ...
user avatar
  • 27
0 votes
0 answers
21 views

Lightning Datatable - setActiveCell to openInlineEdit

LWC Lightning datatable offers a method to open an inline editor openInlineEdit() which opens the inline edit panel for the datatable's currently active cell. (See here: https://developer.salesforce....
user avatar
  • 1,598
-2 votes
0 answers
34 views

How to pass the value of Radio button from LWC to Apex Class [closed]

I am having 2 radio options 1.Yes and 2.No where in javascript handle event i am able to get those values . I need to know how to pass that value to apex class and with that i need to perform some ...
user avatar
0 votes
1 answer
30 views

Need to change appearance of LWC based on a record's field

How to store an information that let users to change the LWC's appearance dynamically? The user can define rules like: If that field's value is "X", appearance should be "A" and/...
user avatar
  • 27
0 votes
0 answers
47 views

NoErrorObjectAvailable Script error Salesforce LWC when updating LWC data table with changed picklist value

I have implemented Custom type (custom component and custom data table) to show picklist values in LWC datatable. I have an event fired from this custom component and handling this event in my ...
user avatar
0 votes
0 answers
30 views

Heroku timeout for Lightning Web Runtime SPA loading the LWC resources

I have a single page application built using lightning web runtime (lwr) that pulls in lwc resources to leverage base components. Everything is deployed and works as expected except for the first time ...
user avatar
  • 407
2 votes
1 answer
77 views

A Variable Passed from my LWC to Apex Becomes Null

ISSUE The parameter name of my Apex method did not match the name of the variable when I called the method from JavaScript. ORIGINAL QUESTION I've never touched frontend before - I have no clue ...
user avatar
0 votes
1 answer
28 views

Is Apex Callout chaining from Javascript controller using Async/await or Promise possible?

I need to make 5 callouts serially. I have written 5 different apex classes. I want to chain these callouts from JavaScript controller using Async/Await or Promises. Had anyone worked on such scenario?...
user avatar
0 votes
1 answer
44 views

How to show results of map<> written in Apex from LWC JS and HTML

This is my Apex Class: public without sharing class VF_SurveyResponsePOC { public static Set<Id> setOfResponseId = new Set<Id>(); @AuraEnabled(Cacheable= true) public static ...
user avatar
  • 9
0 votes
0 answers
23 views

On click of button I want to show data in table format which I get from apex controller. How to do that. Data I want to show on new web page in SF [closed]

On click of button I want to show data table.show data on new web page
user avatar
0 votes
0 answers
23 views

This is my radio group is not displaying required = true

<lightning:radioGroup variant="label-hidden" value="{!v.ET3}" class="slds-p-left_medium slds-p-top_medium" label="Radio Group Label" options=&...
user avatar
5 votes
0 answers
40 views

How to use loadScript with Light DOM in LWC - getting error "Invariant violation: Expected template to be an object"

I'm trying out the Light DOM beta as I want to see how it will work with certain 3rd party libraries, but I cannot load a 3rd party javascript resource. I have the following component on a Salesforce ...
user avatar
0 votes
1 answer
84 views

Getting a null error in Jest test

i am new to LWC and jest test.So while doing the testing i have got an error. TypeError: Cannot read properties of null (reading 'style') js file @wire(getItemProperty, { iId: '$contactId' }) ...
user avatar
0 votes
1 answer
19 views

Getting Error an LWC error when a user clicks in detail page

A user is getting this error everytime they try to make an edit on their detail page on a case record: [LWC component's @wire target property or method threw an error during value provisioning. ...
user avatar
-1 votes
0 answers
20 views

Duplicate object with same field

With this code , I successfully duplicate the object Template__c by creating a new one . I need to do the same thing for the object Template_Section__c . Using the same function , and I want to have ...
user avatar
1 vote
2 answers
39 views

Prepopulating company name in Lead object

I want to prepopulate the Company field in the Lead object. The idea here is that I don't want a Company Name in my Leads ie the Account object is not necessary for me. Now, as you know the company ...
user avatar
  • 109
0 votes
1 answer
16 views

Do not render data when lightning-accordion is collapsed

I have a lightning accordion and lightning accordion section with some data when they are expanded. I would like to show/render this data only when the accordion is expanded/open and when it is ...
user avatar
-1 votes
3 answers
33 views

How to retrieve the one particular lwc component (only one) from org to vs code?

We all know that it is possible to retrieve all the lwc components from org to vs code using the manifest file but I need to just get only one lwc component from org. Is there any way to do so please ...
user avatar
0 votes
0 answers
42 views

Is it right way to check CRUD Permission in LWC?

import { LightningElement, wire } from 'lwc'; import { getObjectInfo } from 'lightning/uiObjectInfoApi'; import ACCOUNT_OBJECT from '@salesforce/schema/Account'; export default class CheckPermission ...
user avatar
  • 1
0 votes
0 answers
27 views

MESSAGE LIST COMPONENT: Is it possible limit who the users can message in OOTB way?

I would like to know if it is possible to have any solution to limit who some users can message based on the profile or any other way with OOTB settings.
user avatar
0 votes
0 answers
18 views

Implementation restriction: TopicAssignment

Using this within digital experience. Works when logged in, but not for non-signed in users. The APEX function: @AuraEnabled(cacheable=true) public static List<Knowledge__kav> searchByTopic(...
user avatar
-1 votes
1 answer
36 views

Access lightning-record-edit-form fields from parent LWC

I have a child component with a lightning-record-edit-form that should work as a standalone component and as a child component as part of another flow. The form takes inputs from users and then, with ...
user avatar
-2 votes
0 answers
20 views

Not able to send email from Case Object quick action custom button

Here the requirement is we have to create a custom quick action which will call the lwc whose functionality is to fetch the email, subject from the case object and when we click send button it should ...
user avatar
0 votes
0 answers
24 views

Print Datatable data LWC

I have a data table in LWC component. I want to print the data of that data table. how can I implement this? I've tried window.print(); but this prints the whole window. anyone knows how can I ...
user avatar
0 votes
1 answer
22 views

conditional CSS in HTML class tag LWC

very simple but stuck. I used conditional CSS in a js file get styleClass(){ return this.show ? 'class0': 'class1'; } In the HTML file, the div class looks like <div class="slds-box ...
user avatar
  • 3
0 votes
2 answers
47 views

How align button to the right?

how can I align this button to the right side? I tried with "some classses" but it is not changing the place (working with lwc) Html: <template> <lightning-card variant="...
user avatar
0 votes
1 answer
23 views

Using --lwc-colorTextIconDefault property to change icon color in LWC css file breaks the code

Using --lwc-colorTextIconDefault property to change icon color in LWC css file breaks the code... However, the result does show on the experience builder page, although the error screen is thrown on ...
user avatar
0 votes
1 answer
26 views

Fire @wire after renderedCallback

I'm trying to retrieve data from Apex using @wire. However, I do not want to fire this event before renderedCallback(). This is because I'm receiving a parameter required to fire a wired event which ...
user avatar
  • 1,095
0 votes
1 answer
45 views

aura lightning component: Field Integrity Exception null: source

I am learning how to use Aura to create lightning components for record pages inside of salesforce. All I am trying to do at this point is to print the name of the Record (I'm testing with account ...
user avatar
0 votes
0 answers
30 views

I am trying to fetch Apexlogs using the tooling API but getting an error of "URL No Longer Exists"

ApexLog al = [SELECT Id, LogUserId, LogUser.Name, Request, Operation, Application, Status, StartTime, Location, LogLength FROM ApexLog LIMIT 1]; String logId = al.Id; System.debug(logId); // Set ...
user avatar
-1 votes
0 answers
25 views

Pass date value in format 6/5/21 from lwc to Apex

I have the following code on Apex side public without sharing class GetClaimnsIntake { @AuraEnabled public static String isPolicyValid(String policyNum, string effectiveDate){ try { ...
user avatar
0 votes
0 answers
17 views

Filter out parent records when they contain no child records in apex

So I have a couple aura/lightning components that are displaying a customer order header (the parent record) along with it's order lines (the child records). Here's a pic: I have two methods that ...
user avatar
0 votes
1 answer
16 views

error message only appears at the 2nd click

I need to show a toast with an error message on a LWC form if one of the fields has an invalid value. the validations are done and the toast appears when it's supposed to, but the message itself only ...
user avatar
  • 1
-2 votes
0 answers
24 views

List View Button To Create New Record Not Working in Community [duplicate]

I created List View Buttom using VF, it's working in Lightning View but For Community, it's not working. what solution i should use?
user avatar
0 votes
1 answer
22 views

lightning-combobox throwing error on selection

I have a lightning-combobox which gives the options to select a field from an fetched apex collection. The component loads without any issue on the page as soon as I select an option I get a page ...
user avatar
  • 2,092

1
2 3 4 5
133