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
29
votes
5answers
19k 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 ...
9
votes
1answer
13k views

How to use custom LWC lightning component in lightning-datatable

If we want to have custom lightning component in LWC lightning-datatable, for example Upload file for each of the records, how can we do that?
17
votes
6answers
13k 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 ...
26
votes
3answers
7k 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 ...
17
votes
4answers
65k 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 ...
11
votes
1answer
3k 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 ...
9
votes
2answers
3k 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 ...
20
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
2answers
6k 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 ...
12
votes
2answers
847 views

Boxcaring is removed from LWC components?

This question is the extension of How to turn boxcarring OFF for LWC imperative apex method calls?. While taking into consideration for LWC implementations, that we do not have equivalent of action....
10
votes
1answer
17k 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
5answers
11k 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 ...
8
votes
3answers
7k views

Google Recaptcha V3 Implementation in Lightning Web Component

I have requirement to add Recaptcha in Lightning Web Component component. I have used V3 of google recaptacha. I have added https://www.google.com/recaptcha/api.js url in static resource and ...
12
votes
1answer
1k 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 ...
11
votes
4answers
841 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
3answers
14k 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 ...
39
votes
2answers
17k 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 ...
8
votes
1answer
11k 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 ...
18
votes
8answers
45k views

Set width of modal window of lightning action

Do you know how can I set the width of a modal window opened by a lightning component action? In the edit options I can set only the height but is not enough because the content of my table is not ...
12
votes
4answers
28k 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). ...
7
votes
2answers
31k views

Custom List view buttons in the lightning environment

I have a requirement where I want to have a custom list view button with an ability to perform a mass custom action in the Lightning environment. I do not see an option to add lightning quick-action ...
5
votes
3answers
5k 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
5k 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 ...
5
votes
1answer
812 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: ...
4
votes
1answer
5k 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
1answer
2k 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 ...
44
votes
2answers
8k 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 ...
2
votes
2answers
5k views

Tree structure in Lightning

How to display User Hierarchy in Lightning. I have tried Jquery but It didn't work.How to display Tree Structure in sales force Lightning
11
votes
2answers
4k views

How to refresh wired service getRecord manually?

Please note that this is not duplicate of LWC Force Refresh Wire getRecord - this question and answer specifically speaks about changes in front-end/UI and capturing that in front-end BUT LDS cannot ...
19
votes
1answer
2k views

Array.find and Array.findIndex has worst performance in LWC Lightning Locker

For the component chain like below: <container> <parent> <child> <grand-child> Pass an Array from container to all the way down to grand-child. This is ...
16
votes
1answer
7k views

Chain wire methods together in Lightning Web Components

According to the documentation here in order to retrieve a list of picklist values for an object we need to pass in a Record Type Id which can be retrieved using the getObjectInfo method. The issue ...
11
votes
4answers
28k views

How to generate/view PDF using Lightning Components?

I need to view/generate PDF in Lightning component. How can I achieve that? Do I have to user VF page with "renderAs" attribute inside Lightning Component? Or is there any other way to achieve this?
10
votes
2answers
8k 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 ...
11
votes
2answers
36k views

Hyperlink a Record in lightning:datatable

Am trying to accomplish a POC in my project. We have a lightning Datatable using . I could generate a set of records to display on the component. But I need one column to be hyperlinked to navigate to ...
22
votes
5answers
24k 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 ...
3
votes
2answers
2k views

Close Lightning Modal by clicking anywhere outside of it

Just wondering whether this is possible? i.e. once a modal is open, close it by clicking anywhere on the grey backdrop? I've tried invoking my custom close-modal function via: - Adding onclick to the ...
6
votes
3answers
13k 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 ...
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 ...
4
votes
3answers
6k 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
169 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 ...
0
votes
2answers
4k views

How to detect browser in lightning component for desktop and mobile both

I need to detect browser type (IE, Chrome, Safari etc.) in the lightning component but navigator.userAgent is not working in lightning.
31
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 ...
12
votes
1answer
28k 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 ...
22
votes
3answers
26k 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://[...
11
votes
1answer
786 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
4answers
5k 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 ...
14
votes
4answers
11k 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. ...
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 ...
9
votes
4answers
17k views

Bell notifications via apex

My customer wants to send bell notifications whenever you add an Attendant to an Event. Is there a way to create custom bell notifications via apex code? If not, is it possible to achieve this ...
9
votes
3answers
44k views

How to refresh the specific Lightning component not the lightning page

I have two lightning component placed on one page lightning app. First Component have refresh icon and I set onclick action to refresh Component $A.get('e.force:refreshView').fire(); but this event ...

1
2 3 4 5
12