function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
dcarmen66dcarmen66 

Navigating to parent of embedded VF page

I have a VF page embedded in a page layout, and I'm trying to recreate some of the related list functionality. The issue I'm having is when I create a "View" link, when you click on it it goes to the record within the VF page scope embedded in the main page, when what I really want to do is to redirect the main page to the record. Does anyone have any suggestions on how to do this?

So...

 

Account Page Layout.

VF page as part of the Page Layout that shows a list of related objects.

When I click on a link to view the records, scope remains within the VF page scope, main page doesn't change.

 

Thanks in advance!

Best Answer chosen by Admin (Salesforce Developers) 
Navatar_DbSupNavatar_DbSup

Hi,

 Try the Target attributes of command Link or A tag. Set the Target attributes as "_parent".

 

 For example:

<apex:commandLink action="http://google.com" value="View" id="theCommandLink" target="_parent" rev="http://google.com"/>

 

Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved. 

All Answers

Navatar_DbSupNavatar_DbSup

Hi,

 Try the Target attributes of command Link or A tag. Set the Target attributes as "_parent".

 

 For example:

<apex:commandLink action="http://google.com" value="View" id="theCommandLink" target="_parent" rev="http://google.com"/>

 

Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved. 

This was selected as the best answer
dcarmen66dcarmen66

I ended up using target="_top" and that did the trick.