Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

15
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
3answers
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 ...
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
28k 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 ...
10
votes
3answers
408 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:...
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 ...
6
votes
4answers
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 ...
37
votes
2answers
12k 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 ...
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 ...
6
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 ...
10
votes
1answer
684 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
607 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:...
5
votes
2answers
8k 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 ...
40
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 ...
8
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 ...
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
6k 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
17k 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
940 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
154 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
660 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 ...
19
votes
3answers
15k 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
20k 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 ...
11
votes
3answers
8k 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 ...
8
votes
1answer
6k 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: <...
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
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....
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 ...
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="...
5
votes
1answer
5k 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 ...
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 ...
0
votes
2answers
853 views

Quick Action using Visualforce - modal dialog width

When you use Visualforce page as Quick Action and modal popup window opens - it occupies 50% of container width. According to Create Object-Specific Quick Actions article For a Custom Visualforce ...
9
votes
4answers
2k 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
13k 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?
2
votes
3answers
3k 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
1k 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 ...
1
vote
3answers
3k views

Getting RecordTypeId selected from 'Record Type Selection' Page, in a lightning component that overrides create screen

We have about three different record types for a custom object, for which I am trying to create a lightning component that will override the standard behaviour. In lightning experience, we are ...
0
votes
1answer
3k views

Default value for an attribute of type Object

I am trying to default Site_Name__c for an attribute "SEComp" from other attribute. It is giving compilation error as Cannot mix expression and literal string in attribute value, try rewriting like {!...
0
votes
2answers
789 views

Accessing Record Id inside a lightning app page component (visualforce page used as component) controller

I have created a lightning app page with type Record Page and override default Opportunities page. I have added a new tab to it's content and added a visualforce page as it component. Please see the ...
22
votes
1answer
2k views

When to use {#v.attrib} vs {!v.attrib}?

I have seen some uses of {#v.attrib} in a few of lightning components, and I'm a person who is used to {!v.attrib}. Is there a difference between them or is there a scenario where '#' has to be used/...