1

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.

/a08/e?CF00N90000009cGU8={!Account.Name}&CF00N90000009cGU8_lkid={!Account.Id}&retURL=%2Fa08%2F0.

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.

2
  • 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

0

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

window.open('/a08/e?CF00N90000009cGU8={!JSENCODE(Account.Name)}&CF00N90000009cGU8_lkid={!Account.Id}&retURL=%2Fa08%2F0');

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

4
  • 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 .