Open New Tab in Lightning Out?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP












3















Scenario:




  1. I want to create a List Button which displays a Lightning Component.



    • The only way to implement this step is to use a Visualforce Page which uses a Standard Set Controller, then use Lightning Out on that page.



  2. I want this Lightning Component to include links which should open in a new tab.



    • The only way I can find to implement this step is to use window.open.

    • I tried out the <lightning:workspaceApi>, but it does nothing in Lightning Out. Nor does it fire any events I could listen for, as far as I can tell.


I read this post, which works well for a "supported" method of navigation in Lightning Out:
How to navigate in lightning out?



However, it does not mention any way to open links in a new tab.



Questions:



Is there a supported way to open a record view (or any page) in a new tab when using Lightning Out? Is there any problem with using window.open, or any risks involved I should know about?










share|improve this question






















  • Workspace API opens a new tab in Lightning console Apps. Its not actually a browser tab.

    – Pranay Jaiswal
    Jan 11 at 21:08















3















Scenario:




  1. I want to create a List Button which displays a Lightning Component.



    • The only way to implement this step is to use a Visualforce Page which uses a Standard Set Controller, then use Lightning Out on that page.



  2. I want this Lightning Component to include links which should open in a new tab.



    • The only way I can find to implement this step is to use window.open.

    • I tried out the <lightning:workspaceApi>, but it does nothing in Lightning Out. Nor does it fire any events I could listen for, as far as I can tell.


I read this post, which works well for a "supported" method of navigation in Lightning Out:
How to navigate in lightning out?



However, it does not mention any way to open links in a new tab.



Questions:



Is there a supported way to open a record view (or any page) in a new tab when using Lightning Out? Is there any problem with using window.open, or any risks involved I should know about?










share|improve this question






















  • Workspace API opens a new tab in Lightning console Apps. Its not actually a browser tab.

    – Pranay Jaiswal
    Jan 11 at 21:08













3












3








3








Scenario:




  1. I want to create a List Button which displays a Lightning Component.



    • The only way to implement this step is to use a Visualforce Page which uses a Standard Set Controller, then use Lightning Out on that page.



  2. I want this Lightning Component to include links which should open in a new tab.



    • The only way I can find to implement this step is to use window.open.

    • I tried out the <lightning:workspaceApi>, but it does nothing in Lightning Out. Nor does it fire any events I could listen for, as far as I can tell.


I read this post, which works well for a "supported" method of navigation in Lightning Out:
How to navigate in lightning out?



However, it does not mention any way to open links in a new tab.



Questions:



Is there a supported way to open a record view (or any page) in a new tab when using Lightning Out? Is there any problem with using window.open, or any risks involved I should know about?










share|improve this question














Scenario:




  1. I want to create a List Button which displays a Lightning Component.



    • The only way to implement this step is to use a Visualforce Page which uses a Standard Set Controller, then use Lightning Out on that page.



  2. I want this Lightning Component to include links which should open in a new tab.



    • The only way I can find to implement this step is to use window.open.

    • I tried out the <lightning:workspaceApi>, but it does nothing in Lightning Out. Nor does it fire any events I could listen for, as far as I can tell.


I read this post, which works well for a "supported" method of navigation in Lightning Out:
How to navigate in lightning out?



However, it does not mention any way to open links in a new tab.



Questions:



Is there a supported way to open a record view (or any page) in a new tab when using Lightning Out? Is there any problem with using window.open, or any risks involved I should know about?







visualforce lightning-aura-components navigation lightning-out workspaceapi






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Jan 11 at 20:38









Adrian LarsonAdrian Larson

107k19114243




107k19114243












  • Workspace API opens a new tab in Lightning console Apps. Its not actually a browser tab.

    – Pranay Jaiswal
    Jan 11 at 21:08

















  • Workspace API opens a new tab in Lightning console Apps. Its not actually a browser tab.

    – Pranay Jaiswal
    Jan 11 at 21:08
















Workspace API opens a new tab in Lightning console Apps. Its not actually a browser tab.

– Pranay Jaiswal
Jan 11 at 21:08





Workspace API opens a new tab in Lightning console Apps. Its not actually a browser tab.

– Pranay Jaiswal
Jan 11 at 21:08










1 Answer
1






active

oldest

votes


















4














I don't see any issues using window.open(). According to Locker API Viewer open is supported.



I have a lightning component that leverages LDS sitting in lighting experience that opens a tableau external report using this method.




Reference: Leveraging Lightning Data Service in Lightning
Framework




NOTE: This is my own blog post but the similar code is used for the tableau report!



Based On Comments: Colors highlight the return types of APIs that are secured by the wrapper.



enter image description here



enter image description here






share|improve this answer

























  • Just gonna see if any other answers roll in. It's good to see that this particular function is supported, though. Thanks!

    – Adrian Larson
    Jan 11 at 21:16











  • @AdrianLarson Your welcome. Even I'm curious to see some good answer too!

    – codeyinthecloud
    Jan 11 at 21:17










Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "459"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsalesforce.stackexchange.com%2fquestions%2f246389%2fopen-new-tab-in-lightning-out%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









4














I don't see any issues using window.open(). According to Locker API Viewer open is supported.



I have a lightning component that leverages LDS sitting in lighting experience that opens a tableau external report using this method.




Reference: Leveraging Lightning Data Service in Lightning
Framework




NOTE: This is my own blog post but the similar code is used for the tableau report!



Based On Comments: Colors highlight the return types of APIs that are secured by the wrapper.



enter image description here



enter image description here






share|improve this answer

























  • Just gonna see if any other answers roll in. It's good to see that this particular function is supported, though. Thanks!

    – Adrian Larson
    Jan 11 at 21:16











  • @AdrianLarson Your welcome. Even I'm curious to see some good answer too!

    – codeyinthecloud
    Jan 11 at 21:17















4














I don't see any issues using window.open(). According to Locker API Viewer open is supported.



I have a lightning component that leverages LDS sitting in lighting experience that opens a tableau external report using this method.




Reference: Leveraging Lightning Data Service in Lightning
Framework




NOTE: This is my own blog post but the similar code is used for the tableau report!



Based On Comments: Colors highlight the return types of APIs that are secured by the wrapper.



enter image description here



enter image description here






share|improve this answer

























  • Just gonna see if any other answers roll in. It's good to see that this particular function is supported, though. Thanks!

    – Adrian Larson
    Jan 11 at 21:16











  • @AdrianLarson Your welcome. Even I'm curious to see some good answer too!

    – codeyinthecloud
    Jan 11 at 21:17













4












4








4







I don't see any issues using window.open(). According to Locker API Viewer open is supported.



I have a lightning component that leverages LDS sitting in lighting experience that opens a tableau external report using this method.




Reference: Leveraging Lightning Data Service in Lightning
Framework




NOTE: This is my own blog post but the similar code is used for the tableau report!



Based On Comments: Colors highlight the return types of APIs that are secured by the wrapper.



enter image description here



enter image description here






share|improve this answer















I don't see any issues using window.open(). According to Locker API Viewer open is supported.



I have a lightning component that leverages LDS sitting in lighting experience that opens a tableau external report using this method.




Reference: Leveraging Lightning Data Service in Lightning
Framework




NOTE: This is my own blog post but the similar code is used for the tableau report!



Based On Comments: Colors highlight the return types of APIs that are secured by the wrapper.



enter image description here



enter image description here







share|improve this answer














share|improve this answer



share|improve this answer








edited Jan 11 at 21:10

























answered Jan 11 at 20:57









codeyinthecloudcodeyinthecloud

3,4771426




3,4771426












  • Just gonna see if any other answers roll in. It's good to see that this particular function is supported, though. Thanks!

    – Adrian Larson
    Jan 11 at 21:16











  • @AdrianLarson Your welcome. Even I'm curious to see some good answer too!

    – codeyinthecloud
    Jan 11 at 21:17

















  • Just gonna see if any other answers roll in. It's good to see that this particular function is supported, though. Thanks!

    – Adrian Larson
    Jan 11 at 21:16











  • @AdrianLarson Your welcome. Even I'm curious to see some good answer too!

    – codeyinthecloud
    Jan 11 at 21:17
















Just gonna see if any other answers roll in. It's good to see that this particular function is supported, though. Thanks!

– Adrian Larson
Jan 11 at 21:16





Just gonna see if any other answers roll in. It's good to see that this particular function is supported, though. Thanks!

– Adrian Larson
Jan 11 at 21:16













@AdrianLarson Your welcome. Even I'm curious to see some good answer too!

– codeyinthecloud
Jan 11 at 21:17





@AdrianLarson Your welcome. Even I'm curious to see some good answer too!

– codeyinthecloud
Jan 11 at 21:17

















draft saved

draft discarded
















































Thanks for contributing an answer to Salesforce Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsalesforce.stackexchange.com%2fquestions%2f246389%2fopen-new-tab-in-lightning-out%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown






Popular posts from this blog

How to check contact read email or not when send email to Individual?

Displaying single band from multi-band raster using QGIS

How many registers does an x86_64 CPU actually have?