Skip to main content

Questions tagged [js]

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

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 ...
Langloic's user avatar
0 votes
3 answers
69 views

I have been getting the error whenever i try to update that from the backend which is been taken as a input from LWC of type datetime. Below is the JS and apex code snippet. async ...
Abhishek Yadav's user avatar
0 votes
0 answers
30 views

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"&...
Raphael D's user avatar
  • 644
0 votes
1 answer
45 views

My requirement is to display the question records based on datatypes which were stored in a custom object as records & capture its responses as well . I was able to retrieve & render the ...
Rv1's user avatar
  • 766
1 vote
1 answer
77 views

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 ...
ramki Dce's user avatar
0 votes
1 answer
169 views

My LWC has an LWC:if / else condition in the HTML, but the condition is not determined on the initial load so it loads the default. When the js runs through all the code and the condition result is ...
Irene's user avatar
  • 2,005
-1 votes
2 answers
80 views

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 ...
Rubén NC's user avatar
1 vote
0 answers
833 views

I'm very new to Journey Builder and custom activities. I want to create a custom activity that simply checks if the current day is a weekday and returns true or false accordingly. I don't really need ...
Misha's user avatar
  • 11
0 votes
1 answer
78 views

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 ...
Irene's user avatar
  • 2,005
0 votes
2 answers
215 views

I have a custom LWC component where I build up a Path in order to display the full picklist value name instead of just a tick when the stage is completed. This all works nicely. The original @wire ...
Irene's user avatar
  • 2,005
0 votes
0 answers
52 views

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 ...
Rostyslav Popov's user avatar
0 votes
1 answer
212 views

Below is the code for timer which is not working as expected HTML code: <template> <lightning-card title="Styling using dynamic CSS"> <div class="dynamicDiv ...
Sai Bhargav's user avatar
1 vote
1 answer
243 views

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=&...
Alejandro Martínez Infante's user avatar
0 votes
0 answers
95 views

I am trying to create an Apex trigger on the Account object using jsforce. I've successfully established an OAuth connection, and I can query and create records without any issues. I've also tested ...
Avishka Dambawinna's user avatar
0 votes
1 answer
113 views

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-...
Marjolaine's user avatar
0 votes
1 answer
109 views

JSON Structure: uiData = [ { "item": { "lineitem": { "discount__c": -43.774, "margin__c": 0.421, "product_cost__c":...
Gaurav Patil's user avatar
0 votes
1 answer
421 views

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 ...
sfdcDev's user avatar
  • 91
0 votes
1 answer
409 views

I am quite new to the salesforce development. Right now I am trying to Iterate over a <tr><td></td></tr> something like this. <aura:attribute name="...
a_man's user avatar
  • 101
0 votes
1 answer
131 views

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 ...
Akash's user avatar
  • 473
0 votes
1 answer
198 views

I am trying to implement a functionality where on moiseover event, I call a lightning modal component. But I want add 2 sec wait time atleast before the modal popup shows up. HTML: <span class=&...
Akash's user avatar
  • 473
0 votes
1 answer
114 views

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> <...
code234's user avatar
  • 456
2 votes
1 answer
163 views

Hi Im removing html tags from a richtext input in order to make it a raw string, the string will be a code snippet. However I could not achieve it through using the standalone.js of prettier library. ...
RProgrammer's user avatar
0 votes
0 answers
158 views

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 ...
Sridhar's user avatar
  • 73
2 votes
1 answer
995 views

I am using the new lightning-record-picker in LWC that should display 2 pickers. One for City__c and one for Street__c, where proposed streets are only streets linked to the selected city. The search ...
Raphael D's user avatar
  • 644
1 vote
0 answers
70 views

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){...
rahul soni's user avatar
0 votes
1 answer
45 views

I am trying to hide or show the table rows by clicking on first row with the below code of Aura component. But neither addClass, removeClass or toggleClass works for me. Am I missing something? HTML: &...
Akash's user avatar
  • 473
0 votes
1 answer
168 views

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 ...
batuayyildiz's user avatar
0 votes
1 answer
97 views

Need to wait the Subscribe operation to be done to get the message from Platform Event to use that message in the Apex call in LWC. You can check the code below. // Apex method call to insert metadata ...
batuayyildiz's user avatar
0 votes
1 answer
519 views

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(...
Goat123's user avatar
0 votes
2 answers
847 views

List item am using an App Launcher Tile to display content in each list in a modal. This tile contains some text and a button. The li tag with tile is dynamically generated using a for loop. Now when ...
Akash's user avatar
  • 473
0 votes
1 answer
621 views

<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 ...
SFDC_learner's user avatar
-2 votes
1 answer
283 views

I have used Eval function in my QCP Code . My requirement is that we have one field on quote line which contains js code. I want to execute that js code dynamically from Qcp. we have around 500+ js ...
samba's user avatar
  • 1
1 vote
0 answers
295 views

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 ...
I am not Fat's user avatar
0 votes
1 answer
249 views

Hello Community Experts, Whenever I use the access token into the $Lightning.use() function, It will give the Invalid session ID error and my component will not load on an external site. I have ...
Tushar Jadav's user avatar
  • 3,575
-2 votes
1 answer
2k views

I have list of data like below format { "Category__c":"SUV", "Control__c":"Automatic", "Description__c":"Lorem Ipsum is ...
user2943892's user avatar
-2 votes
3 answers
937 views

I know this is very specific but is just an example, I already tried: Math.round(Math.round(num + "e+2") + "e-2").toFixed(2, 3, 4..) Math.trunc Math.pow.. But nothing works.. How ...
Alexia Ribeiro's user avatar
1 vote
1 answer
77 views

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 ...
code234's user avatar
  • 456
1 vote
2 answers
290 views

I'm attempting to pass text from a lightning-textarea to my apex handler. I'm still getting null values for the message, but am not sure why. Any help would be greatly appreciated. HTML: <...
kai998's user avatar
  • 69
1 vote
1 answer
313 views

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 ...
SF Learner's user avatar
-1 votes
1 answer
282 views

I am able to calculate easily if it is greater than today. setConditionalFormatting(){ if(this.myTaskWrappers){ this.myTaskWrappers = this.myTaskWrappers.map(item => { ...
SF Learner's user avatar
0 votes
1 answer
161 views

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, ...
MatejN's user avatar
  • 31
0 votes
1 answer
632 views

How do I change the picklist value to Sold automatically from my JS in LWC? Here's what I have: this.template.querySelector("c-single-select-picklist[data-id='" ...
Ryan McNeely's user avatar
0 votes
1 answer
556 views

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&...
Lavanya Pushpakar's user avatar
-4 votes
1 answer
215 views

import { LightningElement, wire, api, track } from 'lwc'; import { getRecord, getFieldValue } from 'lightning/uiRecordApi'; import getAcc from '@salesforce/apex/Controller.getAcc'; import F1 from '@...
annat's user avatar
  • 1
0 votes
1 answer
153 views

import { getRecord, getFieldValue } from 'lightning/uiRecordApi'; import FIELD1 from '@salesforce/schema/Account.SumOpp__c'; import FIELD2 from '@salesforce/schema/Account.Name'; const fields = [...
annat's user avatar
  • 1
0 votes
1 answer
805 views

Whenever i checking the checkbox then their result is showing in other component But now i want to remove the Acme Account so i Uncheck this but the Edge Communication is removing (means Last Checked ...
Sourabh Singh Chauhan's user avatar
1 vote
1 answer
453 views

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=&...
Sourabh Singh Chauhan's user avatar
0 votes
2 answers
4k views

I have a lightning-accordion that works outside a table, but when I tried to put inside a column in a table it doesn't collapse, it's possible to do that? <table class="slds-table slds-...
Alexia's user avatar
  • 83
0 votes
1 answer
372 views

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 ...
Brian23Gt's user avatar
  • 141
0 votes
1 answer
54 views

I am getting this error while using this code in aura compopnent Error:Failed to save ObjAttachment.cmp: No COMPONENT named force:previewPanel found: Source Thanks in advance.
Harsh Kumar's user avatar