I have a lightning component,lightning controller and a custom 'New' button.Since custom button can only refer to VF page and not to lightning component.How can I make VF page to call lightning component as soon as custom 'New' button is clicked.

I cannot go with Quick Actions since I need this in List view and Actions cannot be added in List view.

Please help with this.

  • You can use $Lightning.use to include it in VF, for which pre-requisite is that you will need to create a lightning dependency app. To call it on button click, it can be wrapped inside a javascript function which is called on button click.
    – Sikha Baid
    Commented Oct 17, 2017 at 10:48

1 Answer 1


You can use Lightning out to expose the Component to Visualforce.

Refer: Use Lightning Components in Visualforce Pages. Information is online hence, not quoting from it. Let us know if you are stuck.

For navigation in lightning on Visualforce, you would have to use sforce.one object.

  • Raul, is there any alternative of lightning out or aura dependency? I need to provide a dynamic resource (With dynamic namespace) in aura dependency. I think we can't do that. Is there any workaround for this?
    – Aakriti.G
    Commented Apr 29, 2020 at 5:20
  • @Aakriti.G That's a good question but unrelated to this one, can you maybe post a new question with more details.
    – Raul
    Commented Apr 29, 2020 at 9:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .