Wednesday, December 11, 2019

How To Open a New Tab in Classic Console Using LWC Lightning Out

You have visual force and inside this your loading the LWC component using Lightning Out in Salesforce Classic Console.

Now,if you want to open a new sub tab (record detail page or visual force page) inside the console on click of a link (inside your LWC .html file) please use the below code.


     <lightning-card title="Additional Details" icon-name="custom:custom18">
       <template if:true={showform}>               
          <a href="javascript:srcUp('/apex/PageName?id=3773737');" target="_blank">Test</a>         

If it's not working or getting any issue please include the below 2 lines script files in your visual force page.

<apex:includeScript value="/soap/ajax/45.0/connection.js" />
<apex:includeScript value="/support/console/45.0/integration.js" />

Hope this helps you..Enjoy..!

No comments:

Post a Comment