Skip to main content

Questions tagged [javascript]

Javascript is a weakly typed interpreted programming language primarily implemented by web browsers to allow for client-side scripting. It can be used in Visualforce pages to give a more dynamic experience to end users. Additionally, the Visualforce engine generates and uses JavaScript to support the functionality of some of its components.

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

I want Available records in DE to get populated in Cloud Page Form using Ampscript?

The question is I have one DE where the records are getting populated on Daily basis from that DE I want the records to get populated in my cloud page where I created a Form page in that dropdown I ...
I_am_Groot's user avatar
0 votes
1 answer
31 views

LWC : [Cannot read properties of undefined (reading 'write')]

I have following LWC component which keeps throwing " [Cannot read properties of undefined (reading 'write')]" error. I have tried everything to check that record is being pulled and new ...
login2sf's user avatar
  • 171
0 votes
0 answers
28 views

Display error message and character count in same line below in lwc

I have a requirement to display a character count underneath an input field, which is a required field. However, I'm encountering an issue: when the user does not input anything and the error message ...
Shira's user avatar
  • 49
0 votes
0 answers
20 views

Third party javascript libraries and keeping them up to date

So our org uses a multitude of third party javascript libraries; for example jquery and usually stored as a static resource. One problem is sometimes these are used in externally facing components, so ...
ensir's user avatar
  • 383
0 votes
0 answers
18 views

How to make fields readonly in Chat SnapIn of Salesforce?

I am using the below code for is there anyway to make FirstName and LastName readonly const initESW = function(gslbBaseURL) { // eslint-disable-next-line no-undef embedded_svc.settings....
Monu's user avatar
  • 1
1 vote
0 answers
45 views

MCP (Personalization) SDK / sitemap which namespace to use and how to configure sitemap for multiple domains

In MCP (Personalization) SDK / sitemap, when we are reviewing the namespace, examples are supporting both: SalesforceInteractions & Evergage https://developer.salesforce.com/docs/marketing/...
kl2's user avatar
  • 353
2 votes
2 answers
85 views

Issues using jsPDF library in an LWC

recently in our org we have needed the ability to create PDF files. I am aware you can do this using visualforce pages with the render as PDF method, however we would like the pdf to be styled more ...
Jake Colledge's user avatar
0 votes
1 answer
89 views

Stop lwc timer when console tab changes

i have a lwc on record page which calculates how much time the tab is active and work is going on . when i am switching the tabs which are standard console tabs on Case object , i want timer should ...
sfdc_to_learn's user avatar
0 votes
0 answers
16 views

Kakao JS SDK Calls in Salesforce

I'm trying to develop a Salesforce component that makes a request to KAKAO API using the KAKAO JavaScript SDK. this is my lwc Javascript code to initiate Kakao App import {LightningElement} from 'lwc'...
송지은's user avatar
1 vote
0 answers
43 views

Child component need to re render after value changes in parent component

I have 3 components. Grand Parent --> Parent --> Child. When ever data changed in Child LWC I need to Re-render the Child LWC which is inside Parent LWC. I have tried GET SET methods also. But ...
Aryan's user avatar
  • 27
1 vote
1 answer
39 views

Connected Callback and RenderedCallback not getting called 2nd time

I have this below service console tab. On the right side i have added a lwc on page refresh if i try to swtich between tabs i can see connectedcallback and renderedcallback is getting called. but 2nd ...
sfdc_to_learn's user avatar
-1 votes
0 answers
18 views

How to get the page url that was defined in the experience cloud?

Let's say I have Support page defined in experience cloud and set the URL as Support. Is there any possibility of fetching it in JS. URL will be something like https://domainname.com/s/support.
Vijay Sai Mahajan's user avatar
0 votes
1 answer
26 views

Apex call returns successfully after errror, resulting in issues

I have an Apex call which causes an error (ENTITY_IS_DELETED, but it doesn't matter which error it is). I might be able to fix that error, but now it somehow also returns successfully anyway, so the ...
Z0q's user avatar
  • 69
4 votes
0 answers
42 views

JAWS reading the error message twice in lightning input LWC

JAWS reads the error message on the lightning input twice, because of the presence of both aria-errormessage and aria-describedby attributes. Values for both attributes are the same. How to resolve ...
LoneWolf's user avatar
0 votes
0 answers
46 views

Beforeunload unexpected behavior in LWC

Im trying to publish a platform event from a LWC if the browser tab gets closed or the browser itself gets closed. It works fine for both of the cases, however if I repeteadly click on the refresh ...
RProgrammer's user avatar
0 votes
0 answers
27 views

Lightning input validation blocking the button click

I have a lightning input configured like below <lightning-input type="text" label="Phone Number" name="Phone Number" ...
LoneWolf's user avatar
0 votes
0 answers
28 views

$A.get('$SObjectType.CurrentUser.Name') is undefined

I am using a script in the head markup file in the experience cloud. $A.get('$SObjectType.CurrentUser.Email') works fine, but $A.get('$SObjectType.CurrentUser.Name') returns null. I tried debugging it,...
user131722's user avatar
0 votes
0 answers
48 views

LWC email pop up button

I'm writing LWC code, and I want to add a button to display an email pop-up like the red line in the image. Is there a library with such email sending functionality?
simba's user avatar
  • 1
0 votes
0 answers
13 views

Integer and List<case> from Apex Class are not shown in Aura Component

I've tried everything, I've checked all the questions and answers, but I can't see the error. Can you please tell me why the numbers and cases are not displayed? System logs are output and it feels ...
Maria Petrova's user avatar
0 votes
1 answer
62 views

Jest test for lwc modal

I'm trying to write a Jest test to cover a scenario: when the "Reset Location" link is clicked, a modal appears. However, I'm unable to access the cancel button within the modal to simulate ...
Shira's user avatar
  • 49
0 votes
1 answer
52 views

[LWC} Passing object records from parent to child results in undefined but not when fields are passed

I'd like your help in understanding what was causing issues in my LWC code. The problem is that in one version of my code (version A), the properties of the child that it took from the parent is ...
darwin3750's user avatar
0 votes
0 answers
41 views

CORS Error when importing third party javascript libraries in LWC

I'm encountering an issue while attempting to integrate a third-party library into my Lightning Web Component (LWC). Despite configuring CORS settings and remote site settings, I am unable to make the ...
Krishnamurthy's user avatar
0 votes
0 answers
78 views

Keep the vertical Scrollbar to be fixed in lightning datatable

<div class="slds-var-p-around_small" style="overflow-x: hidden; overflow-y: auto;height:300px;margin-top:50px;"> <template if:true={data}> <c-l-w-c-...
Chandrasekar M G's user avatar
1 vote
1 answer
129 views

LWC Global Uncaught Promise Error Handler

I am trying to implement a global uncaught promise error handler for a lightning web component. The goal is to reduce the catch(error) statements for promises: getDocumentTypes() { ...
29espoa's user avatar
  • 33
0 votes
0 answers
28 views

LWC duplicates instance when switching back lightning record tab

Im using a LWC in case record page, however when I switch the tab from the case record page to any other such as the "Welcome" or "Install a Package" the LWC is still alive. But ...
RProgrammer's user avatar
0 votes
0 answers
18 views

How to render the label of a lightning-button in a lightning-datatable but disable the lightning-button onclick functionality itself?

This is linked somewhat to the questions here and here. I have a lightning-datatable that has a column that is a lightning-button which, when clicked, invokes a lightning-modal. The UX behavior that I ...
Andy Hitchings's user avatar
0 votes
0 answers
37 views

Button to trigger download function in JavaScript code is not working, while it is working as expected outside the LWC

I created a LWC to read a query data from CRM Analytics and download an Excel/CSV file. I am able to download the query data as .xls file but I want to convert it into csv file. Following is the code ...
Mukund's user avatar
  • 1
1 vote
1 answer
201 views

Adding event listeners in the Constructor of LWC

Generally, In Lightning Web Components (LWC), you should not manipulate the DOM or add event listeners in the constructor. The constructor is called when an instance of the component is created, but ...
Rahul Allada's user avatar
0 votes
1 answer
44 views

How to get these two functions in LWC to not run at the same time? How to get one to wait for the other to be finished?

connectedCallback(){ this.blurHandler = () => this.testFunction(); this.beforeUnloadHandler = () => this.testFunction(); } I am getting the issue where both of these events the blur and ...
James's user avatar
  • 37
0 votes
0 answers
32 views

RefreshEvent doesn't refresh standard RelatedList

@api recordId; filiale; accManager; pbName; pbId; get statutAffectation() { return "PR"; } connectedCallback() { setTimeout(() => { getRecord({recordId: this.recordId}) ...
Fark's user avatar
  • 27
1 vote
0 answers
35 views

How does persistent browser caching work internally?

What does this option do internally? Enable secure and persistent browser caching to improve performance in caching And when does it reload new HTML / CSS into a user's mobile device? When updating ...
Z0q's user avatar
  • 69
1 vote
1 answer
47 views

Aura component After action.setCallback code not executing

After action.setCallback code not executing, In Console log I can see only this The system debug is returning in the debugging. So, the apex is being called, returning a value. No error in Apex side ...
SK2889's user avatar
  • 921
1 vote
1 answer
40 views

Child lWC not all row values being passing over to Parent

I have 2 LWC components. Trying to summarize all of the Labor_Total_Calculated__c values from the child record to the parent component. I can see the values in the child cmp in the 'handlechange' ...
Phuc's user avatar
  • 369
1 vote
1 answer
52 views

Populate LWC HTML row based on JS results

I am trying to resolve 2 issues with an LWC Render a calculated value in an LWC after the user inputs. After the calculation, render value on correct row. I can see the calculated value in console ...
Phuc's user avatar
  • 369
1 vote
0 answers
42 views

RefreshView / RefreshEvent doesn't work when call LWC from Aura?

Since we can't override Standard button NEW with LWC , i'm calling my LWC from Aura component The button NEW is placed on related list , on click it opens the form in new Tab (limit Salesforce) , LWC ...
Fark's user avatar
  • 27
1 vote
0 answers
37 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){...
rahul soni's user avatar
2 votes
2 answers
113 views

Use dynamic CSS based on the value of a field within a Lightning Web Component

I am trying to specify a background color and a font color depending on a numeric value of a field. I have that working no problem. This is how it looks. HTML: <lightning-layout-item size="4&...
eazy4me's user avatar
  • 384
0 votes
1 answer
124 views

How to compute values in lightning-datatable when cell change

I am attempting to perform calculations when there is a change in a cell. Specifically, if the values of either Q1__c or Q2__c change, then I want to compute the value of First_Half_Amount__c (i.e., ...
Afrose ahamed's user avatar
0 votes
0 answers
64 views

Apex decrytion error: "System.SecurityException: Given final block not properly padded. Such issues can arise if a bad key is used during decryption." [duplicate]

I am having some problem implementing a decryting function using a secret key and hash iv. I have a working code snippet in java script, but when I try to implement the function in apex, I get this ...
Ethan Lin's user avatar
0 votes
2 answers
187 views

LWC render logic resetting previous records

I am trying to have an LWC where the user can add rows and the new row will render fields based on the user selected value. I have 2 issues with my LWC After user selects first field picklist value ...
Phuc's user avatar
  • 369
0 votes
0 answers
24 views

I need the Values of a picklist in a LWC and not the API Name with JS

as with all my posts I hope you are well. I have the following doubt: I am working with lwc and I need to have the description of a picklist when executing the onchange event. This is my code: LWC: &...
Felipe Peña's user avatar
0 votes
1 answer
191 views

Loading Custom Font In LWC from Static Resources

Im So confused with this, I have tried a lot of ways but none of them seems to work for me. The resource is named "IBMPlexSerif", its file is a .zip named "IBMPlexSerif", When I ...
RProgrammer's user avatar
1 vote
0 answers
78 views

How to stop a static resource loaded from a LWC as a Quick Action from impacting other LWCs as Quick Actions?

I have two Quick Actions that leverage LWC components on the Opportunity flexi-page. In my first LWC, I have a custom CSS from an imported static resource that gets loaded in a renderedCallBack. The ...
Andy Hitchings's user avatar
0 votes
0 answers
107 views

Is it possible to add new row and save record using lightning data table?

Im trying add new row in lightning data table to create and update records using custom lightning data table. For existing records its updating the values and even dependent picklist showing properly. ...
Afrose ahamed's user avatar
0 votes
0 answers
272 views

To add a row and create a new records inside a lightning datatable

When i try to add new row and create a records in the lightning datatable, its not able to add and create the records. i will share the html code and js code <div class="slds-var-p-...
Chandrasekar M G's user avatar
0 votes
1 answer
72 views

LWC delay refreshApex until batch job completes

I have a datatable in an LWC where rows can be selected for deletion. The delete process is done via a batch job due to multiple triggers running for the object being deleted. Once I've kicked off the ...
Irene's user avatar
  • 1,849
0 votes
1 answer
58 views

Detect cursor in current tab outside of LWC

Hi Im trying to know if a user is idle in a record page tab, and to do it I have placed a LWC in the record page so it could maybe read the outsider events. I have tried using window.addEventListener('...
RProgrammer's user avatar
0 votes
0 answers
48 views

Three.js LWC static resource

i am trying to use Three.js(3d rendering) in lwc and so far it seems to be working with the static resource file I got from this. but I need to import additional modules like 'OrbitController' and I ...
kkJhn's user avatar
  • 23
0 votes
2 answers
80 views

Error When Trying to Load a LWC

I have a LWC where I am trying to display a list of records of that same Object, I have been able to insert the record successfully but after that the list has not being displayed, and after some ...
Luis Escalante's user avatar
0 votes
1 answer
187 views

LWC Restrict <lightning-input> to number with max value

I have an input on an LWC which has to be a number and not greater than 2000. How do I go about achieving this, because whatever I've tried is not working. This is my input definition: <lightning-...
Irene's user avatar
  • 1,849

1
2 3 4 5
112