Skip to main content
New
Stack Overflow Jobs powered by Indeed: A job site that puts thousands of tech jobs at your fingertips (U.S. only). Search jobs

Questions tagged [javascript-controller]

A controller is a JavaScript Object, created by a standard JavaScript object constructor. In the Aura Framework, the JavaScript controller is client-side.

Filter by
Sorted by
Tagged with
30 votes
3 answers
27k views

How do I debug my lightning component?

I have seen and read many posts in regards lightning component errors and realized there are no questions actually asking how to debug them. I recently stumbled upon: How do I start to debug my own ...
glls's user avatar
  • 20.2k
7 votes
1 answer
756 views

Can we use the event's attribute "path" in Lightning?

I've been working on a pretty complicated component, and I've had all kinds of trouble simply trying to identify which element is currently being used. After all sorts of experiments, I found a really ...
sfdcfox's user avatar
  • 494k
3 votes
2 answers
4k views

urlEvent is undefined

We have below code being called from Cancel button on a Lightning component. We have used this lightning component on VF page. navHome : function (component, event, helper) { var urlEvent = $A....
Pasan Eeriyagama's user avatar
5 votes
2 answers
6k views

lightning:input help -- keyCode

I'm seeking more info on lightning:input for use in a Lightning Component. What I want to do is have the input text field submit when the user presses the Enter key. However, the Enter key seems to ...
PatMcClellan__c's user avatar
4 votes
2 answers
30k views

Lightning response.getReturnValue() question

I did not find much info on the "response.getReturnValue" function and what it exactly returns. I understand that this is the function that must be used when a Client Side JS controller calls a Server ...
SFDC Dev 27's user avatar
3 votes
1 answer
5k views

$A.util.removeClass not working in some cases

On init of a component, I want to hide an element lightning:buttonIcon if some condition is satisfied(see controller code). In this case it is getting satisfied and I am reaching the code where ...
Sarang's user avatar
  • 2,586
2 votes
1 answer
952 views

Can't handle an Application event in Lightning

I am trying to handle Application event in a listening component but it doesn't work for some reason. Please, help. I can't write in console log "here" in the end Application <aura:application ...
Helen Redeh's user avatar
6 votes
2 answers
1k views

Locker Service and Fullcalendar.io

I have seen that there have already been some questions regarding the open source Fullcalendar.io and the various libraries associated with it, and the strict requirements of Locker Service, but I was ...
Logan's user avatar
  • 330
5 votes
2 answers
1k views

Packaging custom labels used in lightning helpers and controllers

So in our lightning code base we usually refer to labels from js helpers and controllers as the following (it's static reference, not dynamic one): $A.get("$Label.c....
wesaw's user avatar
  • 3,080
4 votes
2 answers
29k views

LWC: Inside an HTML template for-loop, set loop variable property to new user-typed input element value?

I'm trying to write a Lightning Web Component (yay, first one). Still in the "proof of concept; can I get user input to propagate around the page?" stage. I have a List<MyApexWrapperClass> ...
k..'s user avatar
  • 1,217
4 votes
2 answers
12k views

Scroll Page to top onClick of a button in Saleforce1

I have a problem scrolling to the top of a lightning component page in Salesforce1. I have tried using window.scrollTo(0,0); Added the below attribute in the button tag oncomplete="window....
Brav's user avatar
  • 820
3 votes
2 answers
6k views

How to load and use external library?

I don't know how to use the library of Pagination in a lightning web component but I can't use the example method: $('#demo').pagination({ dataSource: [1, 2, 3, 4, 5, 6, 7, ... , 195], ...
Alex M.'s user avatar
  • 534
3 votes
2 answers
6k views

Multiple lightning:recordEditForm

I have a quick way of entering multiple records where user can add rows(record) to add. I am using lightning:recordEditForm component in aura:iteration. When i add multiple rows everything is working ...
Nikhil Prashar's user avatar
3 votes
1 answer
1k views

Can actions/methods in the client controller (Javascript) and server controller (APEX) have identical names?

In the documentation I found the following tip: Use unique names for client-side and server-side actions in a component. A JavaScript function (client-side action) with the same name as a server-side ...
loneboat's user avatar
  • 387
2 votes
1 answer
899 views

How to pass a Javascript array to an Apex controller?

I have the following problem, I want to assign an array of javascript to a list of the apex controller. I have to update 3 list of the saleforce page with a "save" button and pass to the controller ...
Mauricio Blanco's user avatar
2 votes
2 answers
5k views

How to add dynamic variable to custom label in lightning javascript helper class

I am using a custom label in lightning controller/helper as: $A.get("$Label.c.MaxCountProducts"); And the label has value as: Maximum Product(s) count {0} is exceeded. I want to dynamically ...
Sarang's user avatar
  • 2,586
2 votes
1 answer
564 views

Is there a way to react to a related list being changed in lightning?

Simply put, i need to make a lightning component, that depending on related objects to the one whose page i'm in, has different functionality. If the user creates a new related object via the related ...
Gusk's user avatar
  • 260
1 vote
2 answers
5k views

Is there any function to deserialize an JSON to an array in lightning component?

I have been using JSON.parse() function to deserialize JSON object, It is not working for special characters. For example, if the JSON contains a date it being converted as 2012&#x2F;04&#x2F;...
Venky's user avatar
  • 634
1 vote
1 answer
99 views

How to replace time part of DATETIME input by value from TIME input

I've tried to find an algorithm (Salesforce, aura) but without success. Probably, you have any ideas! I have: attribute <aura:attribute name="bulkApply" type="Map" default=...
Daniel Velesevich's user avatar
1 vote
2 answers
8k views

Click outside of popover to hide?

I'm trying to do the popover shown on the lightning tutorial: https://www.lightningdesignsystem.com/components/popovers/ I'm new to lightning and I have been looking around on how to hide the popover ...
akcorp2003's user avatar
1 vote
1 answer
1k views

Passing an aura:iterated list item to JS controller

The goal is to pass a "comment__c" rich text field on an iterated object to its JS controller to perform a string operation on it before it's returned to limit a tooltip it is to appear into 250 ...
Jeff's user avatar
  • 191
0 votes
1 answer
1k views

Salesforce Calling Server Side action Infinitely from Lightning Component

I am facing a weird issue of Salesforce calling infinite times the Server side Action from the Lightning component. Has anyone faced a similar issue? I am pasting the code for your reference. <...
Abhiram Sheshadri's user avatar
0 votes
1 answer
808 views

lightning:input update time value

I have two time inputs for start and end times: <lightning:input type="time" name="startTime" label="Start Time" min="05:30:00.000Z" max="19:00:00.000Z&...
JimG's user avatar
  • 743