Questions tagged [lightning]

This tag is for questions related to the "Lightning Experience" which comprises a number of elements around a new User Interface on the Salesforce Platform. While it can still be used in a server side MVC environment, it is primarily a MV UI where the Controller is JavaScript based operating from the user's browser. Lightning "Pages" are single page applications.

Filter by
Sorted by
Tagged with
16
votes
2answers
9k views

Getting Session ID in Lightning

Background I'm using Apex Wrapper Salesforce Metadata API to update some picklist values on the fly. (i.e. Every time a record is inserted/updated/deleted in Table A, I'm adding/subtracting picklist ...
12
votes
4answers
6k views

Lightning QuickAction (API) without modal

I am attempting to replace JS buttons with quick actions. These button simply call a web service method and alert the result and need no user interaction. With quick action a modal always seems to ...
14
votes
2answers
4k views

How do I call functions loaded from a Static Resource JavaScript file?

I'd like to put some shared Javascript to Resource file to reuse it between several components. This Javascript is general purpose set of utility functions. However, functions from my resource file ...
8
votes
1answer
2k views

How do I Call the Salesforce API from a Lightning Component?

I have a requirement to make a call to the Apex Wrapper Metadata API from a Lightning component. The issue I am facing is that there is currently no native support for acquiring a valid API session ID ...
19
votes
2answers
3k views

Lightning Components in Visualforce - Unable to read sobject

I've started seeing this error since the Spring 16 release when I retrieve an sobject from the Apex controller, update it and then send it back to the server. I originally thought this was down to a $...
14
votes
4answers
31k views

Getting the URL parameter into Lightning component using the “{! paramName}” expression

I am new to communities in lightning and I am trying to figure out a way to directly fetch the URL parameters into the lightning component attributes using the {! urlParamName} expressions. for ...
22
votes
2answers
5k views

How to navigate in lightning out?

Actually I am using lightning components with a visualforce page, because this is the only way to override standard button (using VF) today. The problem is that, i need to redirect my user to the new ...
10
votes
3answers
444 views

Is There a Limit to Lightning Formula Parameters?

As I use the client side to enforce various pieces of business logic with aura:if statements, I'm finding that a given formula operator cannot handle more than two parameters. For example, this works:...
6
votes
5answers
5k views

Lightning component quick action - send parameters to the lightning component

I have a lightning component that is available for use as lightning component quick action. I need to use this component from various object actions, for example, I will add a lightning component ...
6
votes
2answers
9k views

Lightning/Aura Components: component.find().getElement never accessible

What are the actions that might destructively interfere with the lightning app's lifecycle? Is a breakpoint\debugger statement one of such? For example there is a case that I happen to meet regularly ...
38
votes
2answers
13k views

What is suggested approach to transfer VF pages to be lightning ready

So I am planning to transfer our current VF pages to lightning ready. Most of our VF pages are based on a standard controller or standard set controller and use an extension. And they are pretty much ...
7
votes
1answer
4k views

How to get Created Record ID in Lightning:recordEditForm?

I am using lightning:recordEditForm and lightning:inputField for creating a new record. this component is being used inside a lightning community builder. When i click the submit button, i am able to ...
9
votes
2answers
2k views

How to make code which uses Lightning promises look more synchronous

When I read about promises, I see that they should appear as solution to prevent callback hell and pyramid of doom but when I actually try to write a code which would use Lightning promises it still ...
10
votes
1answer
725 views

Examples of use of getValueProvider

I was looking through the AuraDocs reference today and found a function on the Component javascript API that I had not seen before: addValueProvider (String keyObject valueProvider) Adds ...
4
votes
1answer
626 views

JQuery Treetable in Lightning is not working when navigating from standard pages to page where treetable is implemented

I have a requirement where I use jQuery Treetable in Lightning and I have implemented the same as below code. I created a Lightning Tab from this component and used in Lightning Experience. Component:...
41
votes
2answers
5k views

Lightning Experience: How to prevent the display of obsolete data?

In many cases I've seen that LE is not displaying recent changes made in Setup immediately like in Salesforce Classic, but somehow cached or delayed. Yesterday I found an easy and perfectly ...
13
votes
4answers
7k views

Render fullcalendar on a lightning component

I have a lightning component that pulls data from Salesforce and adds them as events on a calendar created using fullcalendar. The component helper contains the method fetching the data from Server. ...
10
votes
2answers
7k views

Lightning URL hack issue with prepopulating fields on Page Load

I have Visualforce Page which redirects to standard accounts edit page with prepoulated value for record Type. The record type is getting populated using URL hack. But since URL hacks dont work in ...
8
votes
4answers
18k views

Create record in Lightning with populated fields

Is there a way to use the sforce.one.createRecord to create an Opportunity and fill in fields with data? In Salesforce Classic this was accomplished by adding parameters to the url (ex: ?name=foo). ...
5
votes
2answers
3k views

Scroll issue in Salesforce1 | Lightning ui:scrollerWrapper issue

I'm using ui:scrollerWrapper to implement scrolling functionality in Salesforce1 application as the default SLDS-SCROLL is still not compatible in Salesforce1 app. Recently, I'm facing scrolling ...
4
votes
2answers
4k views

Issue in Lightning desing System modal component

I have developed new Modal using lightning desing system.In standard modal new button pop up appears on whole broweser lightning page. But when I desgined using SLDS it will come up but still ...
4
votes
2answers
4k views

How to do a javascript button in Lightning?

We depend on a javascript button to allow our salesforce screens to interact with another web application. We read some elements from the salesforce contact, and then call a js func hosted on another ...
2
votes
1answer
1k views

Show/Hide CSS Ignored When Inside an SLDS Grid Column

I'm just trying to get a simple show/hide experiment running using the code below. It runs fine when the code is outside the SLDS grid. However when I place the div inside a grid column, the console ...
4
votes
3answers
3k views

Modal pop up issue; background is not fading and pop up does not appears on whole browser lightning page

<div aria-hidden="false" aura:id="newClientSectionId" role="dialog" class="slds-modal slds-modal--large slds-fade-in-open slds-hide" style="width: 60%; margin: auto; "> <div class="...
1
vote
1answer
156 views

Opening Lightning Application with not enough security access level raises internal error with Gack Id -227057212

Opening Lightning Application which refers to SObject for which current running user doesn't have permission raises internal server error with Gack Id -227057212 Steps to reproduce: Create custom ...
29
votes
3answers
5k views

How to build custom UI that works both for users that have opted in to Lightning Experience and users that have not?

This isn't a question about the pros/cons of Lightning/Visualforce, but is a question about how to build custom UI for the period of time (a year or many years?) where some users/orgs have Lightning ...
11
votes
1answer
670 views

Calling Apex from Lightning returning a class extending an Abstract class

I have found an issue that when calling an Apex method from Lightning that returns a class that extends an abstract class, then only the @AuraEnabled getters from the concrete class are returned, the ...
20
votes
3answers
16k views

Lightning App - getting URL parameter

We are planning to convert some of our VF pages to Lightning apps. Some our VF pages, particularly surveys are URL parameter-driven, since we send survey links directly to users, i.e. https://[...
10
votes
1answer
21k views

Use of setCallBack() in Lightning

I am new to Lightning and I am completing Lightning Components Developer Guide. Here, in client-side controller, there is a method 'setCallBack()' used to call the method in server-side controller. I ...
11
votes
2answers
1k views

Salesforce Lightning Ready certification

Could you please provide main steps of "lightning ready" certification? Which checks application should be involved in before "lightning ready" certification? We have an application with several ...
14
votes
4answers
1k views

Lightning Framework vs Standard Client Side Frameworks (i.e. React) // Which to chose when, and why?

Disclaimer Keep it objective! This one can get a little opinionated, please try to keep your answer specific to the facts a developer should be considering when choosing between two viable options ...
12
votes
3answers
9k views

Lightning component's .focus() not working

I have an input field: <ui:inputText aura:id="name-input"/> With controller code: var input = cmp.find("name-input"); console.log(input); input.focus(); This gives the error: Access ...
7
votes
1answer
7k views

Dynamically create html components in lightning

Since HTML tags are first class citizens in lightning is there a way to instantiate them as components in lightning? Something like: $A.createComponent( "html:div", { "...
5
votes
1answer
3k views

Handler change not working with attribute updated inside aura:iteration

change handler doesn't work when the attribute is a list which can be updated an aura:iteration. In the following example, we never go to controller method itemsChange ( except at the init) whereas ...
5
votes
1answer
2k views

Access Check Failed! on ui:inputText component event after Apex call

I've got a really basic component which call an Apex method when we press the Enter key. However, since Spring'16, I've got the following warning message: WARNING: Access Check Failed! Component....
2
votes
1answer
1k views

e.force:refreshView and e.force:showToast not working

These salesforce events are not working in my case. I have used them earlier w/o any problem but currently they are not working. Can somebody tell me what do we need to do in this case? Do we need to ...
17
votes
4answers
13k views

Salesforce lightning get current users username

How I would go about getting the current users username or first and last name? I have been looking at this for the last couple of hours - I was just wondering how I would go about getting their name ...
12
votes
4answers
10k views

Winter 17 release : event.getSource is not a function on lightning:button

I'm trying to get the label of the button the user has clicked on by using event.getSource, but I'm getting the error that event.getSource is not a function. Component <lightning:button variant="...
9
votes
1answer
8k views

Parent Field in Lightning Datatable [duplicate]

Are Parent Fields supported in lightning Datatable? I'm trying to display Account Name with Contact information, but it seems parent fields are not supported in lightning datatable. Component: <...
8
votes
2answers
4k views

Is it possible to set the value of an aura component to an expression dynamically?

For example, is it possible to bind the label of a button to a "myButtonLabel" attribute by adding an expression string like in the following example? $A.createComponent( "ui:button", ...
7
votes
1answer
1k views

How can I activate a Lightning Page via metadata?

I am deploying a solution which includes Lightning Pages and I would like to programmatically activate the FlexiPage in the target org when it is deployed. In the Configure Lightning Experience ...
5
votes
1answer
6k views

Lightning toast is not working

I know by title it feels not acceptable but hear me out. I have registered below event in my cmp file <aura:registerEvent name="showToast" type="force:showToast" /> and an helper method as ...
5
votes
1answer
5k views

How to do drag and drop in lightning components?

I am trying to drag and drop images from one block into another and if in the block an image is already present then those images must get swaped
3
votes
2answers
3k 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....
1
vote
5answers
3k views

Unable to load jQuery in Salesforce Lightning Application after Summer '16 Release

I have a couple of applications built in Salesforce's Lightning Components. Recently Salesforce released their Summer '16 Major Release this past weekend, on June 4th 2016. Something weird happened ...
9
votes
4answers
3k views

(MS Edge) Error when accessing window.location in lightning components with LockerService enabled

My lightning component (V40/SU17) errors out when accessed via MS Edge with LockerService enabled. Is there a different method of accessing the window.location? WindowLocation.cmp <aura:component ...
7
votes
2answers
14k views

component.find() vs aura:attribute

There are 2 ways to get values from UI in JS controller. component.get("v.name"); component.find("name"); My question is when both can serve the same purpose, which one to use and when?
3
votes
1answer
2k views

Why are my JavaScript objects equal to Proxy {}

I am loading a JavaScript object between Lightning Components var model = {} model.user = {} model.caller = {} model.caller.name = 'Batman'; model.other = {} // etc And then into component ...
2
votes
3answers
4k views

Dynamically add and remove rows in lightning

I have to dynamically add and delete records in my lightning page. I have done with adding the rows but I am not getting how i will remove the records. Rather I am not understanding how I will get ...
2
votes
1answer
410 views

Where can I get the URL for adding a VF page through iframe to a custom lightning component?

Where can I get the URL for adding a VF page through iframe to a custom lightning component? 1 I create a VF page. 2 I know that I can display it in lightning using the following approach <...