• yl
  • 0 Points
  • Member since 2015

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
  • 1
Hi I have the following formula that works perfectly in classic mode:

HYPERLINK ("/apex/Test_Lead_Detail?objType=Lead&objId=" & Id, IMAGE("https://app.test.com/images/icons16/Test16.png","View in Test"))

,where Test_Lead_Detail is a visual force page bound to a Test_Lead_Detail controller. However this approach does not work for lightning mode.

If I inspect the element, in classic mode the html is 

"<div id="00NB0000001GhlL_ileinner"><a href="/apex/Test_Lead_Detail?objType=Lead&amp;objId=00QB0000001mI5q" target="_blank"><img src="https://app.Test.com/images/icons16/Test16.png" alt="View in Test" border="0"></a></div>"

But in lightning mode it's

"<div class="dataCol"><a href="javascript:void(0)" ontouchstart="javascript:{ var openEvent = $A.get('e.force:navigateToURL');  openEvent.setParams({'url':'/apex/Test_Lead_Detail?objType=Lead&amp;objId=00QB0000001mI5q'});openEvent.fire();}" data-aura-rendered-by="196:3421;a"><img src="https://app.test.com/images/icons16/Test16.png" alt="View in Test" border="0"></a></div>"

which does not repond when clicked.

Anyone has similar experience please? Thank you in advance.
  • September 25, 2015
  • Like
  • 0
I have built in some VF pages which are embeded in the page layout. These pages have some buttons on it which redirect to a new page.

For the page to open in the same page and not within the iframe i have used the javascript windows.top. Now this would not work on the new lightning UI as it would overwrite the lightning container.

I am pretty sure this is a use case for many existing applications. Is there a workaround or ideas to open the new page within the lightning container, but within the iframe holding the VF page in pageLayout