Questions tagged [js]
The js tag has no summary.
172 questions
0
votes
0
answers
41
views
LWC Building help to understand html issue
I am trying to increase my LWC knowledge and set myself a little task that seems too big for me. I have asked some AI platforms, but I think a good human would be better.
I have a custom object with ...
0
votes
0
answers
30
views
Use Third-Party JavaScript Libraries - Swapy
I am trying to use Third-Party JavaScript Library Swapy in a LWC.
but I get error on the load script
<template>
<div class="list-container">
<ul id="swapy-list"&...
1
vote
1
answer
74
views
Display Selected Contacts Inside Input Field in LWC
I am working on a Lightning Web Component (LWC) where users can search and select multiple Contacts. Currently, the selected Contacts are displayed below the input field, but I want to show them ...
-1
votes
2
answers
80
views
Change event.CurrentTarget after calling apex method
I'm trying to modify the event.currentTarget (a cell of a table) with the information returned by an Apex method, but every time I click on the element, the information of the apex class is not yet ...
0
votes
1
answer
78
views
LWC @wire getRecord getFieldValue value not available for filter on getPicklistValues
My LWC displays a custom path but requires a filter on a value in the data as to which of the picklist values to display. With help on my previous post to get the filtering to work (LWC custom path ...
0
votes
0
answers
51
views
Dropboxsign embedded into lwc iframe
I have two questions, first is this error: Missing parameter: client_id that I face when I try to use sign_url that I get from https://api.hellosign.com/v3/embedded/sign_url/' + signatureId, in the ...
1
vote
1
answer
240
views
LWC - Community redirect to Home not working
I am modifying a lwc in a community in order to redirect to the Home page when you click on a button. The code is the following:
CommunitySiteLogo.html
<template>
<img src={imgLogo} alt=&...
0
votes
1
answer
113
views
LWC html showing null when inspecting
I'm new to lwc salesforce
I have an apex method called from js and then showed in html that take some time because it contain a soql, the method works when I select a combobox value
<lightning-...
0
votes
1
answer
417
views
How to make a lightning-input allow only numeric values in LWC
I have a lightning-input to display phone number in a pattern 111-111-1111.
I took a lightning-input of type text and written an onblur method handlePhone and sent the inputted phone number as ...
0
votes
1
answer
129
views
JS classList not working
I have a data structure that is getting returned from apex and I am using that to render some html elements in for loop. Within this elements, I have one lightning-button that needs to be hidden based ...
0
votes
1
answer
114
views
Lightning tree grid component not displaying related contacts
I am using a lightning-tree-grid to display accounts with related contacts but cannot display the contacts associated with the accounts. What could be the problem?
HTML:
<template>
<...
0
votes
0
answers
157
views
Need Help with Importing Salesforce Schema for Custom Fields
I've created a custom picklist called Discount_Type__c within the Opportunity Product object. Despite using the appropriate schema import statements in my JavaScript code, I'm encountering ...
1
vote
0
answers
70
views
dynamic css changes based on selection from dropdown
in this code, based on value from drop down i am tryig to change some css, it is removing css but while selecting another value from dropdown it is not adding css again.
handlePaymentTypeChange(event){...
0
votes
1
answer
168
views
lightning-spinner does not show up when a js function is working
Here is my code
// Need to use the result from Promise but it is coming false
const validateCompleted = await this.validateData(data);
if(validateCompleted){
...
}
// When validating data, I want ...
0
votes
1
answer
519
views
Call apex method from LWC with parameters after record creation
I am inserting data to a custom object through LWC. I want to call an apex method from the JS with the Id of the newly created record and current user's email address.
Apex Method:
@AuraEnabled(...
0
votes
1
answer
619
views
How can I remove onmouseover Event onclick of a button LWC
<div class="slds-col slds-size_8-of-12 messagecontainer" onmouseover= {handleMouseOver} onmouseleave={handleMouseLeave}>
What I want is when I click a certain button I want to nullify ...
1
vote
0
answers
295
views
How do i set the value of a custom column via a LWC
I am trying to set the value of an custom checkbox field for the cart component, so that it can be mapped over to Order and OrderSummary.
The mapping between cart, Order and OrderSummary seem to be ...
-2
votes
1
answer
2k
views
Filter data on client side js in LWC
I have list of data like below format
{
"Category__c":"SUV",
"Control__c":"Automatic",
"Description__c":"Lorem Ipsum is ...
1
vote
1
answer
77
views
Incorrect values displayed on LWC
I have created a simple LWC to display a list of account records in a box on clicking of a button but the records displayed on the grid are getting repeated.
Controller:
public with sharing class ...
1
vote
1
answer
311
views
I want to change the color of my utility icon on lwc. No option to add class on its tag: lightning-icon
I have added the utility icon to my table based on condition i.e. dynamically and it's working fine but I want to change its color too which doesn't seem to work for me. If anyone could help. I tried ...
0
votes
1
answer
161
views
Get method returns undefined value in loc, using getRecord @wire adapter
I have an issue with proper passing of the value, getting undefined errors. Would appreciate any input.
Parent Componen
import { LightningElement, api, wire } from 'lwc';
import { getFieldValue, ...
0
votes
1
answer
556
views
"Malformed JSON: Expected '{' at the beginning of object"
When i execute the apex class in the Annonymous Window i get the output, but when i call the apex class in js . in the console i get
"{
"exceptionType": "System.JSONException&...
0
votes
1
answer
153
views
How to concat two getfieldvalue in one in lwc?
import { getRecord, getFieldValue } from 'lightning/uiRecordApi';
import FIELD1 from '@salesforce/schema/Account.SumOpp__c';
import FIELD2 from '@salesforce/schema/Account.Name';
const fields = [...
1
vote
1
answer
453
views
Data Showing on Console but not on Component
if i select one or more than one checkbox then their account records should be show on subscriber component
Here is the Code ====HTML====
<template>
<lightning-card variant=&...
0
votes
1
answer
370
views
Embed Managed Aura component inside LWC
Is there a way to embed an Aura Managed component inside an LWC? The reason is that the aura component shows me which image is currently selected, and I can get the "src" by querying the ...