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

Questions tagged [create-lwc-app]

The tag has no usage guidance.

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

LWC Could show checkbox group inside lightning-tabset correctly

In order to provide users with a UI in which he could select some products with groups of products based on global category I am trying to show lightning-checkbox-group inside lightning-tabset, this ...
user avatar
-1 votes
1 answer
138 views

I want to display the records of a custom Student object on entering the names of students as input. The records are not showing up on the table

searchStudentComponent.html <template> <lightning-card> <h3 slot="title"> <lightning-icon icon-name="standard:account" size="small&...
user avatar
1 vote
2 answers
322 views

Salesforce LWC An Internal Server Error has occurred - managed package only

I'm having a slightly irritating error when trying to add some of my code to a managed package. I'm sure there's something silly that I'm doing. I have a LWC which calls two separate apex methods - ...
user avatar
  • 11
0 votes
0 answers
32 views

I want to update my opportunity record 'onclick' [duplicate]

Here onclicking the substage the index value changes to that particular stage.I have used 'selectedindex' to get the value of the currentstage.I am planning to use an update record method with the '...
user avatar
0 votes
0 answers
37 views

How to use handler functions in lwc

Here I have used a handler function to get the selectedindex from html.But instead of the index number(for eg:3 here) I need to get the current step (substages-step 6,step 7,step 8). js: import { ...
user avatar
0 votes
0 answers
95 views

When I change the stages of an opportunity automatically the substages should change without refreshing

I have added substages for each stage of an opportunity and now it should change when each stage is changed.Performed using lwc: My current code js: import { LightningElement,api,wire,track } from '...
user avatar
0 votes
0 answers
66 views

Not able to find index.js on Heroku [LWC OSS]

Getting the following not found error while deploying a new, non-modified version of LWC OSS. It was just a simple installation of npx create-lwc-app, and some basic steps in the package.json to make ...
user avatar
1 vote
1 answer
190 views

Not able to deploy LWC OSS app to Heroku

Getting the following error when I am trying to deploy an LWC OSS app to Heroku, I tried to deploy my app which had customizations got the same error, but now this is an LWC OSS fresh installation ...
user avatar
1 vote
2 answers
110 views

Could Not Find module "lightning/ariaObserver" LWC OSS

I am trying to implement a project with LWC OSS, when trying to import lightning-input I am facing the following error. I tried to import the lightning-button and I was able to import the same ...
user avatar
0 votes
0 answers
119 views

How to display different input types(checkbox radio text) according to the user's preference in lwc

This is the current preview of my app where when i click a particular survey the corresponding question and answer is displayed.I want to modify the answers in such a way that answer type can be ...
user avatar
0 votes
1 answer
71 views

Edit Lighting Web Component and retrieve code

My org recently had a lighting web component written launched into production. Unfortunately, the team we outsourced this to left off a necessary field. I would like to edit this code to include this ...
user avatar
0 votes
0 answers
36 views

Placeholder in html dynamically

Hello MY requirement to change the placeholder of an html dynamically to change its height and width in lwc this is my above code how can i change dynamically its height and width the placeholder ...
user avatar
0 votes
1 answer
62 views

New to LWC. Trying to learn using LWC components with VS Code [closed]

My objective is to play around with LWC components at https://developer.salesforce.com/docs/component-library/bundle/lightning-datatable/documentation by reading documentation and develop these ...
user avatar
  • 1
1 vote
1 answer
142 views

Refresh Content in lwc component on all instance

I have created one messanger component in Lightning web component where i am saving and getting the messages from Object. I want that once i saved the message it should reflect on every users instance ...
user avatar
-1 votes
1 answer
177 views

LWC Select component to select value based on specific value in JS not HMTL

I have code right now below that selects the value based on the selectedindex of 0 or since I only have two options. What I am trying to figure out is how to set the select value instead of by 0 or 1 ...
user avatar
  • 27
0 votes
1 answer
665 views

LWC Select component how to default value in JS not HTMl

I am trying to default the value of the select to a specific value based on a condition so I cannot just put selected in the html. I need JS code that will automatically update it. For this though I ...
user avatar
  • 27
0 votes
0 answers
44 views

LWC OSS - Google Recaptcha - Shadow Dom

I'm working on implementing recaptcha into an LWC OSS app hosted in heroku. I've been succesful getting it to work using the following code. I am getting the error to add lwc:dom="manual" ...
user avatar
  • 21
0 votes
1 answer
169 views

How to get value from Case.Account.Primary_Email__c and Case.ContactEmail from case recordID and autopopulated in To field on email page in lwc?

Controller_consumerSendEmail.cls public with sharing class Controller_consumerSendEmail { @AuraEnabled(cacheable=true) public static void sendEmailToController(String toSend, String subject){ ...
user avatar
-2 votes
2 answers
3k views

Call LWC @wire method on button click [closed]

I want to display a list of opportunities when a button is clicked. I have achieved the task using imparative Apex call but I want to do this with @wire method. HTML: <template> <...
user avatar
  • 97
0 votes
2 answers
1k views

LWC : onchange Handler not getting fired when @track attribute is changed

I have two lightning input in a simple LWC component having respective onchange handlers and being @tracked with respective attributes. Second onchange handler is getting fired when I update second @...
user avatar
0 votes
1 answer
512 views

Data table in LWC

Is it possible to achieve this in the data table in LWC? If yes please share some reference. If I select any rows under any category like the colour scheme and if I click save it should save. Please ...
user avatar
1 vote
1 answer
317 views

LWC Build Files Explaination

I have been trying to research this on my own, but I can't find a simple explanation that tells me the difference between the following 2 files: lwc.config.jsonhttps://developer.salesforce.com/blogs/...
user avatar
3 votes
9 answers
5k views

Unable to build Lightning Component source for markup://c:HelloWorldLightningWebComponent: Invalid suffix: json

I have created a project named "HelloWorldLightningWebComponent", and created a LWC component to it. While deploying the source to org from VSC, getting the error message. I have checked the ...
user avatar
  • 127
1 vote
1 answer
275 views

Is it possible to use LWC-related npm modules & webpack to leverage the LWC framework with Cloudflare Workers?

I am hoping to use the LWC framework with Cloudflare Workers in JavaScript, but running into some issues. It seems like Wrangler ignores node_modules so I was hoping to use webpack in order to load ...
user avatar
0 votes
1 answer
221 views

How we can achieve navigation to another page in LWC OSS?

I created my first app using LWC OSS. I want to achieve the navigation from one page to another (url in the browser should change) I have two files created in LWC OSS app first file at src/client/...
user avatar
0 votes
1 answer
2k views

draftValues in lightning-datatable lwc

I have a lightning datatable html code <c-custom-lightning-datatable key-field="Id" data={sObjectRecordList} columns={columns} ...
user avatar
  • 1,071
0 votes
1 answer
227 views

Nested loop is lwc js

I am facing a strange problem I have the following piece of code : const allUpdatedFieldsIncludingAccount = event.detail.draftValues; var tempUpdatedList = []; ...
user avatar
  • 1,071
2 votes
1 answer
377 views

How to configure Socket.io to work with LWC OSS?

I am trying to use socket.io library with LWC OSS and followed the below steps: Created LWC OSS app using the command npx create-lwc-app my-app Installed socket.io library using the command npm ...
user avatar
  • 8,312
1 vote
0 answers
287 views

Toast is not showing in LWC in community

import { LightningElement, track,wire } from 'lwc'; import { ShowToastEvent } from 'lightning/platformShowToastEvent' import Lead_Object from '@salesforce/schema/Lead'; import {...
user avatar
1 vote
2 answers
944 views

OSS SLDS + LWC Background Color

How do you change the background of an OSS LWC application using SLDS? I would like it to be something different than is pale blue. EDIT: I have tried setting the background via CSS, or changing the ...
user avatar
  • 1,345
0 votes
1 answer
6k views

Make a field required in lwc form

I have created a lightning web component, which takes in two values LastName and Email and creates a Contact record. Here I have made the LastName as required html code <template> <form> ...
user avatar
  • 1,071
0 votes
0 answers
86 views

Why isn't my LWC passing the values on submit to my apex class?

I've created an lwc that is called in a flow, but when I run it the form doesn't submit and the values aren't passing to the apex class. I can't figure out why. The form allows me to populate the ...
user avatar
  • 1
0 votes
1 answer
29 views

Lightning Input fields

Can I create a lightning record form which is not related to any object it just checks the input values of the fields and posts the toast message. Example I want to create a quiz application wherein I ...
user avatar
6 votes
1 answer
1k views

Lightning Open source use of base components

A few days back an npm package for base lightning components was released Base Lightning Components With this I am expecting to use base lightning components like my favorite lightning-datatable in a ...
user avatar
0 votes
2 answers
9k views

Show and hide in LWC

There 3 records fetch by query and since I using iterator It shows 3 buttons as well whenever I click any show button it expands all 3 records I just wanted to expand only that record which button I ...
user avatar
0 votes
1 answer
53 views

How to show LWC multi-line toasts?

Does anyone know how to implement multi-line with LWC ShowToastEvent? I can only see workarounds using Aura but not LWC.
user avatar
  • 503
0 votes
1 answer
188 views

Query Selector is not working when I am putting inside renderedCallback Lifecycle hook in Lightning Web Component

I am creating a variable crashride and doing querySelector inside renderedcallback then I am using that variable inside another function. But if I directly say this.crashride inside the function ...
user avatar
1 vote
2 answers
823 views

Invalid mutation LWC

I'm trying to clone the array of records that is passed to the component and add some additional attributes to the cloned records however I always get the 'Invalid mutation: Cannot set "...
user avatar
0 votes
1 answer
99 views

Can't use lightning components in create-lwc-app

I created create-lwc-app (with Electron) and the build breaks when I try to use lightning-textarea for example (Module not found: Error: Can't resolve 'lightning/textarea' in .....'). Are those not ...
user avatar
  • 1
1 vote
1 answer
2k views

LWC Component Tabs are not getting refresh, when moving back and forth on different tabs in the Lightning App [duplicate]

I created an LWC component with lightning-radio-group and added it to the Lightning App, it only shows which value is selected by the user. As I selected value and move the back and forth on the tabs ...
user avatar
  • 11
0 votes
0 answers
279 views

LWC pub sub : subscribing component fetching stale data from apex

I am having two separate LWC components on the App Page. One is for adding Team members(Call it A 'members-skills') and other for showing all the team members(Call it B 'Team list'). Current ...
user avatar
  • 1
0 votes
1 answer
617 views

Refresh button with time in lwc?

I have kept the refresh button my requirement is when I click the refresh button it needs to show the time for each time refreshing the page or record there is any resolved solution? Like this, I need ...
user avatar
0 votes
1 answer
449 views

Named Exports in Lightning Web Component

Can we have named export in Lightning Web Component? In ES6 module there are two ways of exporting module: Default Export Named Export I am able to find deault export in lwc export default class ...
user avatar
6 votes
3 answers
549 views

Is curly brace optional in lwc import statement

Below is my JS code in LWC: import searchBears from '@salesforce/apex/BearController.searchBears'; import { LightningElement, wire } from 'lwc'; I would like to understand why some import statements ...
user avatar
1 vote
0 answers
1k views

How to make font-awesome icons work on Lightning Web Components?

Downloaded the latest version of the Font Awesome Icons as a .zip file, I extract the files and uploaded the file all.css as a static resource in my scratch org. Below is my html <i class="fab fa-...
user avatar
0 votes
1 answer
1k views

how to pass data from form made on LWC to visualforce page

I've been trying to connect paypal with salesforce using paypal api: "https://www.paypal.com/sdk/js?client-id=sb&currency=USD"> the problem, i'm not able to implement this api in lwc but i ...
user avatar
0 votes
2 answers
525 views

how to pass data from child window to parent window using lightning web component

how can i pass the data from child window to parent window using lightning web component to populate the new window i used this code popup = window.open("fileName", "Popup", "width=600,height=700"); ...
user avatar
1 vote
1 answer
293 views

How to export flow to external website

I am trying to use flow in my local as mentioned here This is how the code looks like: And I'm getting this CORS issue: Access to XMLHttpRequest at 'https://casesrnd-dev-ed.lightning.force.com//...
user avatar
  • 33
0 votes
2 answers
1k views

How to fetch new data in Lightning-record-form? LWC

I am facing an issue with getting the latest data on a simple search and update form that i have made in LWC. All i am trying to do is to search a case, get the details and then update it. It works ...
user avatar
2 votes
2 answers
2k views

Getting this error in the LWC Component? How can we resolve it?

<template for:each={fields} for:item="fields"> <tr class="slds-hint-parent" key={fields.id}> <td role="gridcell"> <div class="slds-truncate">{fields.value1}​</div> ...
user avatar