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
Qin LuQin Lu 

Create a drill down for a field in visual force page

I have a visual force page based on a custom object. I have include this page as a section in Contact standard page.  I need to create a drill down for one of the field to naviage to custom object detail page. The outputlink I put as the following
<apex:outputLink value="/{!fa.ID}">{!fa[field]}</apex:outputLink>
If I do this way, if I drill down, the target view is rendered inside the section in Contact standard page, the URL doesn't change.

If I do the following
<apex:outputLink value="/apex/{!fa.ID}">{!fa[field]}</apex:outputLink>
If I drill down, it navigates to some URL, but the target URL is not right, the URL is  https://c.na15.visual.force.com/apex/a04i000000EJYTZAA5. 

So value="/{!fa.ID}" is correct, but only specify this as value, it doesn't navigate to out from the contact standard page. 
Best Answer chosen by Qin Lu
bob_buzzardbob_buzzard
You'll need to set the location of the parent window through javascript to achieve this.  Should be close to the following:

<apex:outputLink onclick="window.location='/{!fa.ID}';" value="#">{!fa[field]}</apex:outputLink>


All Answers

bob_buzzardbob_buzzard
You'll need to set the location of the parent window through javascript to achieve this.  Should be close to the following:

<apex:outputLink onclick="window.location='/{!fa.ID}';" value="#">{!fa[field]}</apex:outputLink>


This was selected as the best answer
asish1989asish1989
<apex:outputLink value="/apex/AvoidDoubbleClick" target="blank">AvoidDoubbleClick</apex:outputLink>

It will open in a new tab.