I have created below button on Employee__c object to redirecting to new window whenever click "New Employee" button on related list of Parent (Account) detail page.


Issue: When i click new employee button on related list it is opening on same window and not redirecing to new tab.

Please help me on this.

  • What have you tried so far? Have you looked at Defining Custom Buttons and Links?
    – David Reed
    Commented Nov 20, 2018 at 13:23
  • @David: I have edited question. Can you please check and let me know your thoughts.
    – sfdccert
    Commented Nov 20, 2018 at 13:44

1 Answer 1


The Custom Button or Link behavior "Display in New Window" is only available for Detail Page Buttons and Detail Page Links. It is not available for List Buttons. To achieve this behavior in a List Button, you would need to change its behavior to Execute JavaScript and use something like


Note that if you do this, you sacrifice compatibility with Lightning, where JavaScript buttons aren't supported.

  • Hi David, button should be work in partner community also. so, i have used list button instead of detail button and it's working fine in salesforce classic and lightning experience but not in partner portal. Do you have any idea why it's not working in pratner portal issue: when i click button no action happen on partner portal.
    – sfdccert
    Commented Nov 20, 2018 at 14:56
  • No, I don't have any idea. That seems to be a totally different question, no?
    – David Reed
    Commented Nov 20, 2018 at 15:02
  • So is there any way to do this in lightning ? It is what i look for Commented Dec 7, 2019 at 21:25
  • @MarcinTrofiniak That sounds like fodder for a new post.
    – David Reed
    Commented Dec 7, 2019 at 21:34

You must log in to answer this question.

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