Skip to main content

Questions tagged [javascript-debugging]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
-1 votes
1 answer
35 views

data is not showing on UI screen what is error in my program plz ans if any know this what mistake i m doing in this

JS:: import { LightningElement,track, wire } from 'lwc'; import fetchPatientData from '@salesforce/apex/PatientData.fetchPatientData'; export default class SalesforceCommandFile extends ...
AMR SHK's user avatar
0 votes
1 answer
88 views

How can I Jest test an Lightning Web Componet which leverages `connectedCallback`?

I have a Lightning Web Component "dapUserList". This is the HTML: <template> <lightning-card title="User List" icon-name="utility:user"> <c-...
Brian Kessler's user avatar
2 votes
1 answer
52 views

User Name returning "null" at seemingly random instances

Okay this is a weird one. I have an aura component that I put on our user record pages that display that user's open opportunities. I pull the recordId from the URL, run SOQL to grab all open opps for ...
SethH's user avatar
  • 41
0 votes
1 answer
347 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
1 vote
1 answer
968 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
31 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
347 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
1 vote
1 answer
279 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
  • 17.3k
0 votes
2 answers
542 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
1k 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
  • 609
0 votes
1 answer
382 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
466 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
339 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
673 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
  • 123
6 votes
4 answers
7k 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
  • 831
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
100 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
4k 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
  • 123
0 votes
1 answer
522 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 ...
James's user avatar
  • 37
1 vote
2 answers
1k 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
655 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
438 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
422 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,651
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
984 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,838
0 votes
1 answer
309 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,821
0 votes
2 answers
72 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
7k 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,144
1 vote
0 answers
76 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
274 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
52 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,458
1 vote
0 answers
107 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.2k