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
5
votes
3answers
8k views

How to create lightning notification?

I am trying to figure out how to create notifications here for a user to see when something happens to my custom object. I currently have a trigger which sends an email to the user and that works fine,...
1
vote
1answer
823 views

Geolocation with LockerService

A simple code getting current user geolocation is strangely ... ignored: it doesn't go to the success callback, neither in the error callBack, so I really have no idea of the cause. As window....
1
vote
2answers
3k views

I want to associate File With Custom Object but getting Error

I am trying to create new File through ContentVersion and Associating it with Custom Object ParentId is ID of Custom Object . Error given is Document: You cannot create a link for a document in a ...
17
votes
2answers
7k views

How to pass query parameters in URL in Salesforce Summer 19 Release?

The requirement was to open a Lightning App page and pass some query parameters in the URL. These query parameters were then used to query data and display in a Lightning component present in the ...
16
votes
3answers
4k views

How to access map or object elements dynamically in Lightning?

In VisualForce we could access dynamically to map elements using syntax {!map[mapIndex]} In Lightning if we try to define a map and use this syntax we would receive an error saying Failed to ...
13
votes
5answers
37k views

Lightning : Icon color is not changing using the fill CSS

According to the documentation (https://www.lightningdesignsystem.com/components/icons/ ) we can change the icon color by using the CSS. I am not able to do it. It always overrides with the Salesforce ...
13
votes
3answers
17k 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 ...
11
votes
3answers
6k views

Use Custom Label in Lightning Component array of String attribute

I want to build a component that looks like the Radio Group Alternate one of the Design System. I want it pretty basic, so I just created 2 attributes, one String for the label and one String[] for ...
9
votes
3answers
1k views

Any good reason for using lightning component

I know in the trailhead there is a comparison between Visualforce and lightning component. And I even made an answer to one question about this the other day. But the question is, nowadays, most of ...
8
votes
1answer
2k views

How to dynamically get VF page and Lightning page host name to use with Window.postMessage between VF and Lightning Component communication

I've lightning component where I'm going to embed a visualforce page, and then there will be communication between these two windows via postMessage API. the problem is how will I get the VF page ...
8
votes
1answer
5k 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 ...
7
votes
2answers
5k views

Word Break - Lightning

I want the string to be transfered to the next line in lightning. In salesforce classic I would just apply to the element style="word-break: break-all". In lightning there's a special tag for that. ...
7
votes
3answers
5k views

Favicon is not working outside of the Community

I am working on a Community for my portal with Napili template. I wanted to have my custom favicon to the entire community. I have configured Edit Head Markup in the community builder with this: &...
7
votes
1answer
3k views

Is there a way to access object properties in Lightning expressions

In a lightning component I would like to be able to reference an objects property dynamically. I'm wondering if there is a way to do this in an expression. In javascript it's easy myObject[myVar] but ...
7
votes
1answer
5k views

Lightning (SLDS) styling for calendar

I have designed a VF page with SLDS, which has a calendar field, how could I replace the current date proportion of the calendar field with some image/icon using SLDS? or any other solutions? Please ...
6
votes
1answer
1k views

Lightning Events in Lightning Page Context

So I have a community builder page with 2 custom lightning components I've dropped into different sections - how do I make them communicate via events? I know that when you have a component inside ...
6
votes
1answer
871 views

jQueryUi input[inputIndex].hasOwnProperty is not a function

I'm trying to use jQueryUi V1.11.4 is a Salesforce Summer 17' Sandbox and I get this error : Uncaught TypeError: input[inputIndex].hasOwnProperty is not a function throws at /resource/1498467744000/...
6
votes
3answers
5k views

component.get(v.body) not working as expected

As per the doc: The root-level tag of every component is aura:component. Every component inherits the body attribute from <aura:component>. The body attribute has type Aura.Component[]. ...
5
votes
2answers
4k views

How to access the profile photo of a user in a Lightning community?

I am trying to make an application that would present chatter content to be displayed in a lightning community. What would be the best way to display the profile photo of the user who posted this ...
5
votes
6answers
50k views

Get value (or other attribute) of lightning:button on click

Does anyone have an idea of how to get the "value" attribute (or name or anything else) of the lightning:button that triggers an action ? I tried to grab the button element from the event....
5
votes
1answer
5k views

How to close Visualforce page opened as Quick Action in Lightning through JavaScript?

One of SObject Lightning pages contains an Action Button which opens a custom Visualforce page. How can I close it in other way than clicking the 'X' button? So far I've tried: window.close(), ...
5
votes
2answers
4k views

how to access the save button in a modal when implementing the force:lightningQuickAction

I am actually creating a component that will implement the force:lightningQuickAction so that my component open in a modal window from the action button.I would like to capture the event where the ...
5
votes
1answer
5k views

How do I get the Lightning Component "destroy" system event to fire?

I have a fairly bog standard Lightning Component with markup like: <aura:component controller="MyController" implements="flexipage:availableForAllPageTypes,force:appHostable,force:hasRecordId,...
4
votes
1answer
2k views

How do I Call Methods in the Console Integration Toolkit from a Lightning Component?

The requirement I am working on is a little complex so I am going to break my question down into a few points for clarity sake. The application I am working on will run in the Salesforce Service ...
4
votes
1answer
1k views

VF page looking like Lightning

In Lightning when I click new account button or new contact button a Lightning styled page appears in the form of popup. However, when I override this button, because I want my custom page for ...
4
votes
2answers
5k views

Is it possible read/write settings of embedded_svc in lightning component of preChat snap-in?

I would like to create two buttons on Snap-ins pre-chat form to route customer to different support departments. According to documentation we can control the agent routing with embedded_svc.settings....
3
votes
2answers
13k views

How to open lightning component tab from lightning quick action instead of lightning modal?

I have build a simple lightning component something like : <aura:component implements="force:appHostable,flexipage:availableForRecordHome,force:lightningQuickAction"> Hello World </aura:...
3
votes
2answers
2k views

Can I pull in the Data Categories for an Article into a custom field that would allow me to sort by Data Category in a list view?

I know there can be multiple data categories, but if I could pull them into a custom field, I could at least do a “contains” filter for the articles. What formula in a custom field on the Knowledge ...
3
votes
1answer
3k views

How to get content of Attached file lightning

I need to display content of attachment within iframe that is embedded in the particular sObject. When you upload file from notes&Attachments related list on salesforce classic its type is ...
3
votes
1answer
727 views

Is it "legal" to surface VF Pages in LEX using "#/alohaRedirect/apex/XXX" URL?

I've "discovered" I'm able to surface Visualforce Pages into LEX (console) by using this url format: https://myorg.lightning.force.com/one/one.app#/alohaRedirect/apex/My_Visualforce_Page I wonder: ...
3
votes
1answer
3k views

how is the url to a lightning component generated?

Can anyone tell me how is the lightning component url in the browser generated ? It is composed from what ? e.g this url : /one/one.app#...
3
votes
1answer
1k views

LWC not recognizing PageRefrence changes and not displaying updated values

I have the below parent aura component which has parent LWC - On clicking redirect button on parent i am passing the attritubes in URL and the values are displayed on the child. This happens for ...
3
votes
2answers
4k views

Lightning events in force namespace don't work inside of a Visualforce page

I am hosting a Lightning component inside of a Visualforce page, and I noticed the force:* events aren't working (ex: force:showToast and force:navigateToObjectHome). They work fine when the component ...
3
votes
0answers
1k views

Cannot delete lightning component

Need help. I am deleting a few obsolete/test lightning components (*.cmp) from our sandbox. There's this one component that I cannot delete. When I tried to delete, Dev Console would give me a message ...
2
votes
0answers
161 views

Include static resource with ltng:require as it is

Let us start with the problem description. I am trying to incorporate d3.js into my Salesforce component. Here is the error I am getting: Uncaught TypeError: Cannot read property 'document' of ...
2
votes
3answers
2k views

Locker Service - Uncaught TypeError: Cannot read property 'expando' of undefined

Uncaught TypeError: Cannot redefine property: title throws at https://final-bugfix1-dev-ed.lightning.force.com/auraFW/javascript/dpJ3LUIaUXt-CtvrXqBcnQ/aura_prod.js:459:356 I have enabled Locker ...
2
votes
1answer
2k 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 ...
2
votes
1answer
205 views

Custom labels in lightning component displayed in another language

I see custom labels used in lightning components are displayed in another language (not in my user language). My org's default and my language is Japanese but they are displayed in English. I also ...
1
vote
2answers
4k views

How display the current user name in lightning component without Apex

Hi All how to display the Current logged in user name in lightning component without writing the apex. as i am tried {!$SObjectType.CurrentUser.Id} this, it will display only Id not name. Can anyone ...
1
vote
1answer
4k views

How to create collapsible/expandable rows in a table based on user action in lightning

I need to add collapsible/expandable rows based on an icon click. My code is effecting all the rows. But I need it for the specific rows where the user clicks on icons to expand or collapse. Below is ...
0
votes
2answers
783 views

How to call a function everytime on iteration in LWC?

This is my code: //myComponent.html <template for:each={myData} for:item="status"> // Do something </template> //myComponent.js changeColor(){ // Do something } I want to call ...
14
votes
1answer
492 views

Cannot read property '$$OwnerKey$$' of null

I have a Visualforce Lightning Out page that's rendering some <lightning:input type="date"> elements. Since the Winter '19 release in the dev sandbox I'm working in, whenever I select a date ...
11
votes
3answers
4k views

Lightning: dynamic index in aura attribute with type List

related post I am having the same issue. Trying to access array with dynamic index arrayList[index] (index from aura:iteration), but Salesforce doesn't support that. Does anyone know how to do this?...
11
votes
5answers
48k views

(Lightning) How do I get the selected value from a Select dropdown list & send it to a method?

I'm trying to implement a single option select dropdown list for my component, and I've gotten as far as displaying the data members and the correct values for them. However, I can't find any example ...
10
votes
2answers
15k views

Getting sObject Type into lightning component

I am building a generic lightning component that could sit on an account or contact page to display related task data. However it would need to display slightly different data based on object page it ...
9
votes
1answer
17k views

How to add custom button to Lightning layout

I have custom button that runs some javascript code, I added it to page layout in Salesforce classic. But when I switch to lightning, on record page my button is missing. I tried creating custom ...
9
votes
2answers
9k views

Difference between lightning and ui tags

I've begun to work on lightning component last days ago and I wonder why two different tags exist for the same things. For example, what is the different between lightning:select and ui:inputSelect? ...
9
votes
1answer
10k views

how to add button to lightning list view

is it possible to add new action along with edit/delete values in drop down near every object(image below) I followed this topic topick the only decision I have come up with is like in this article ...
9
votes
2answers
1k views

Aura transaction details

I have a fundamental question about Lightning technical design. Today viewing debug logs I noticed that if Lightning component make multiple calls to server-side (invoke multiple apex-controller ...
8
votes
4answers
4k views

Dynamic reference to static resource in lightning component

In lightning, we can reference to static resource by a value provider like: <img src="{!$Resource.staticResource}"/> Is there any smart way to make it dynamic like: <aura:attribute name="...

1
3 4
5
6 7
12