2

How to create a JavaScript button on the related list in lightning that navigates to a visualforce page. Since the javascript buttons are not working on the lightning experience so we need a workaround for the same. The existing JS code navigates the end user to visualforce. we need to achieve the same on Lex on of the related list.

1 Answer 1

1

The related List does not support Action either in classic or Lightning. They only support button. You can create button of content Type:-

  1. URL
  2. Onclick JavaScript
  3. Visualforce Page

But, Onclick JavaScript does not appear in Lightning. It only comes in Classic.

So you are left with only two options, Either you go for button of content type URL or visualforce page. In your case, better to choose the URL as content type of button because you can easily navigate to your users via it if you don't have complex conditions.

If you have conditions like when to navigate where, choose Visualforce page route.

Note:- You should always choose the button of type List Button to make it appear in related List.

Read more about buttons and Links here:- Create Custom Buttons and Links

You must log in to answer this question.

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