Questions tagged [javascript-debugging]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
104 views

Issue with options in lightning-select from js

I am learning to build some basic lwc and I am struggling with dynamically putting lightning-select options from JS. Here's the html: <lightning-select name="distribution-...
Maciej Zadworny's user avatar
0 votes
1 answer
330 views

ssjs System.Collections.Generic.Dictionary`2[System.String,System.Object]

I have a SSJS code that i am running SFMC cloudpages. The code is to do a HTTP.GET call to a url and then parse the JSON response.when trying to write out the result of parse i receive the following ...
sam sfmc's user avatar
0 votes
0 answers
25 views

Value set from JS controller does not reflect on CMP file

I am working on a functionality that hides a button and uses a wrapper for assigning a value (ex. wrapperClass.showButton = false). I checked the Apex debug and it is setting the wrapperClass....
Mareux's user avatar
  • 11
0 votes
2 answers
199 views

Setter is not getting invoked ,Could anyone please help me understand the flow and how to get setter invoked?

Html File <template> <lightning-input label="Enter your First Name" onchange={captureFName}></lightning-input> <lightning-input label="Enter your Last Name&...
sfdcgv's user avatar
  • 29
0 votes
0 answers
16 views

The method "handlesignup" is not been callled by browser console when deployed . can you check my code once?

Here is the html part <template> <lightning-card title="Customer Sign Up"> <div class="slds-p-around_medium"> <lightning-input label=&...
SOMANKAR CHAKRABORTY's user avatar
1 vote
1 answer
174 views

How to avoid problem with debugging LWC Javascript?

Due to some recent changes, first: Enabling by default Use Lightning Web Security for Lightning web components Enable Stricter Content Security Policy it becomes impossible to debug LWC Javascript ...
Patlatus's user avatar
  • 16.4k
0 votes
2 answers
381 views

A conditionally executed single line should be denoted by indentation

In a javascript file, I get the indentation code quality error: closeComp() { const selectEvent = new CustomEvent('hidemodal', { detail: true }); this.dispatchEvent(selectEvent); } ...
Anmol Khanna's user avatar
10 votes
2 answers
765 views

Debug Components in an Org With LWS Enabled - breakpoints not working

The new Lightning Web Security model that is set to overtake Lightning Locker is not working the way the SF docs explain. In short: I do not have an 'lws' folder. From developer.salesforce.com: When ...
bkwdesign's user avatar
  • 581
0 votes
1 answer
337 views

Javascript "getElementById" return null in Visualforce Page

Anyone help me, why Javascript "getElementById" return null in Visualforce Page. In my form, I have "Radio button" and "inputtextarea" My requirement is whenever click ...
Tara's user avatar
  • 1
0 votes
0 answers
386 views

Action failed: flexipage:runtimeComponent$controller$init [Headers is not a constructor]

I am trying to create a currency exchange app and anytime I deploy the code to my org via VS Code, I keep getting the error Action failed: flexipage:runtimeComponent$controller$init [Headers is not a ...
Afonja's user avatar
  • 3
1 vote
1 answer
285 views

Salesforce LWC In ScreenFlow looks different in debug mode than in production

We are experiencing a weird issue with a LWC that is imbedded into a Screenflow Login flow. When we debug the flow in flowbuilder, the css is perfectly structured and the LWC signup form component ...
Shaun van Huyssteen's user avatar
0 votes
1 answer
550 views

LWC: How to add integer value into an array in JS controller which is bound to the data property of lightning datatable

Let's consider the below scenario: I have a scenario to bind integer value which is calculated from apex function. I have to display integer value in lightning datatable column. Please find the code ...
Rose 's user avatar
  • 121
4 votes
4 answers
5k views

Facing issue in debugging LWC Javascript with Chrome DevTools

I am trying to debug LWC JavaScript using Chrome's DevTools. However I am unable to see /modules/c component under sources tab of Chrome DevTools. The same is working fine for other sandbox. Does ...
LakhanP's user avatar
  • 801
0 votes
1 answer
2k views

LWC [object Object] returns undefined when trying to access property values

I have data returned from apex as a string: [{"Rank":1,"Points":61,"Name":"Susan Johanson","Id":"0038d00000ANPt7AAH"},{"Rank":2,&...
Jonathan Fox's user avatar
2 votes
0 answers
98 views

amcharts index.js is rejected by loadScript() in LWC with empty exception

We tried to include amcharts5 libraries - index.js, animated.js and xy.js in LWC. Animated.js and xy.js is loaded properly in LWC but index.js is failing with an empty exception and it goes inside the ...
Parul Gupta's user avatar
2 votes
1 answer
3k views

Type error in LWC cannot read properties of null - the log is showing the data

I have a LWC that I am debugging(did not write it myself). Its showing 'Type error in LWC cannot read properties of null' yet when i print to the console i can see the data. What else could be the ...
Pauline's user avatar
  • 375
2 votes
1 answer
1k views

How to reset values of a multiselect combo box on click of a button in LWC

In my parent component I'm calling child component as: <c-multiselect-picklist multi-picklist-values={picklistValues} onselect={handleChange} preselected-string={selectedPicklistValue} data-id=&...
Rose 's user avatar
  • 121
0 votes
1 answer
464 views

How do I turn this array into one array in LWC? [closed]

ExampleArray = [["Relationship", "Subscriber"], ["memberId", "12345"], ["MemberName", "Test Member"]] How would I turn the above into just ...
Drake's user avatar
  • 37
1 vote
2 answers
979 views

Enable Lightning Components "debug mode" for a guest user

Is it possible to turn on Debug Mode for Lightning Components for a guest/anonymous/not signed in user? When I go to Setup -> Custom Code -> Lightning Components -> Debug Mode, I cannot see ...
Mark Beavis's user avatar
1 vote
1 answer
562 views

Sorting the List in Javascript [closed]

@api weekdaySelectionData=[]; The below is coming through data table, but I just want to sort the final list: weekdaySelectionData=[{"Day__c":"Tue","Morning__c":true,&...
user91530's user avatar
0 votes
1 answer
385 views

What is the meaning of a>>>0 in javascript? where a is an integer variable holding a value in js [closed]

I tried to do a small poc to understand this in detail like . var a = -1; a>>>0; var a = 0; a>>>0. I know this is right shift zero fill binary operator but what does >>>0 ...
user43388's user avatar
0 votes
1 answer
401 views

Dymanic add Row in LWC and updating the value before push

i have a JSON Object which has Parent Details, In my page i have an option to add New Row dynamically when i click on + button. [ { "canRepeat": true, "dynamicName&...
SFDC_Beginner's user avatar
3 votes
0 answers
1k views

window.addEventListener("message") not working in salesforce mobile app

I have an Aura component that opens a canvas app. The canvas app communicates with the Aura component using window.postMessage. In my Aura component during init, I am adding a listener for postMessage....
Anmol Kumar's user avatar
  • 3,599
0 votes
2 answers
4k views

Unexpected token error in If statement in LWC Javascript controller

This is a basic javascript question. FYI the context is: It is in a Javascript controller for a Salesforce Lightning Web Component, editing in Visual Studio. The code is for selecting a set of table ...
skycafe's user avatar
  • 397
0 votes
0 answers
3k views

Callback failed Error for Lightning Aura Component

I am facing the below error for the Lightning component. I tried to debug but was not able to find the root cause. This page has an error. You might just need to refresh it. Error in $A.getCallback() ...
Aditya Phadke's user avatar
3 votes
1 answer
972 views

Salesforce lightning inspector chrome extension not found [closed]

Tried to install Google chrome extension Salesforce Lightning Inspector but it takes me to 404 page which means that there is no extension literally not available to install. Is there a way to get ...
Bforce's user avatar
  • 6,828
0 votes
1 answer
285 views

SOQL query on related records in Javascript(Visualforce page)

I have written below query in Javascript(Visualforce page) and trying to access query result as shown below, but it is failing at second console log and giving error in developer console. var ...
Arvind's user avatar
  • 15
0 votes
1 answer
2k views

In JS of LWC, line after forEach statement does not execute

I have below Javascript function in lwc apexJobInfoData; @track isBatch; getData({ error, data }) { if (error) { // TODO: handle error } else if (data) { this.jobId = ...
SfdcBat's user avatar
  • 4,781
0 votes
2 answers
69 views

Javascript validation check not working

I am trying to check javascript validations on some fields in visualforce page. Following is my code. <apex:page > <html> <head> <script> ...
Umair Ayaz's user avatar
3 votes
1 answer
6k views

LWC constructor() error: "Must call super constructor in derived class before accessing 'this' or returning from derived constructor"

I'm getting the following error: Must call super constructor in derived class before accessing 'this' or returning from derived constructor after adding a very simple test constructor to my LWC ...
Brent Bowers's user avatar
  • 3,094
1 vote
0 answers
75 views

Visualforce <Apex:tabpanel> breaks MathJax (math formating script)

Problem: I am using mathjax to format math equations nicely on a visualforce page. Everything goes great on a naked vf page. <apex:page > <!--script id="MathJax-script" src="https://cdn....
Ryan Sherry's user avatar
4 votes
1 answer
201 views

How to use polyfill in visualforce component?

Link to polyfill: https://github.com/jonstipe/number-polyfill The polyfill is to allow increment decrement buttons in Internet explorer for I added the .js and .css file from the polyfill as a ...
VChandra's user avatar
1 vote
1 answer
51 views

Unable to setup custom javascript detail page button

I am working on detail javascript button in the lead object. But now I am facing the below issue. Javascript code: {!REQUIRESCRIPT("/soap/ajax/30.0/connection.js")} {!REQUIRESCRIPT("/soap/ajax/24.0/...
Pavan tej's user avatar
  • 1,450
1 vote
0 answers
96 views

LEX becomes unresponsive when debugging (adding breakpoints) to loaded static resources

Using Chrome - Version 72.0.3626.121 I often find myself integrating 3rd party libraries and while attempting to do so in LWC's errors are not uncommon, so, I check the errors and using the ...
glls's user avatar
  • 20.1k