0

For the package configuration, I need a Salesforce 'custom link'.
The 'custom link' has to open in a new window.
I need JavaScript for it.
I tried it with following code but it does not work:

window.open("http://google.de");

Is there a way I can get this working (with JavaScript)?
Thanks

Edit: I tried it in a VF-Page, but it should also work in lightning.
Edit2: I have a strong feeling that it is not possible to use JS for a package configuration link (I tried the 'custom link' on the home tab and it was working there).

2
  • Is it a VF page or Lightning? Apr 27 '17 at 7:08
  • @PranayJaiswal please see the edit.
    – Detached
    Apr 27 '17 at 7:10
1

Is it okay to achieve this without JS?

When you create a custom link you can select always open in New Window/tab it will always open in new window irrespective of your environment(Classic/Lightning)

enter image description here

1
1

Since it strongly seems that it is not possible to use 'OnClick JavaScript' for a package configuration link:

A possible solution would be to use a 'Visual Force' page (for 'Custom Link').
Inside this 'Visual Force' page, there could be either a JS script with a redirect to the external page or an HTML link to the external page.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.