Find your content:

Search form

You are here

Quickly jumping to related-list on VF page


The standard pages have menus at the top that allow you to quickly jump to the related lists further down on the page. Can we add these to our VF pages? I am using standard controller and using apex:detail tag.

Attribution to: doga

Possible Suggestion/Solution #1

There is no 'supported' way of displaying these hover links on custom (VF) detail pages just yet.

Here is an idea for it, which is surprisingly unpopular. I would've thought it would have a lot more votes.

However, there are hacks, (which I haven't tried) where the JavaScript from page source has been used to render these sections on custom pages.

Attribution to: techtrekker

Possible Suggestion/Solution #2

Sorry guys, I am answering my own question. Hope it might be useful.

I developed following javascript code to generate similar links.

<apex:component >

<apex:includeScript value="{!URLFOR($Resource.JqueryUI, '/js/jquery-1.6.2.min.js')}" />

<script type="text/javascript">
    var $jq = jQuery.noConflict();

    $jq(document).ready(function() {
        var relatedlists = $jq("div.bRelatedList");
        var i = 0;
            var rlid =;
            var target = '#' + rlid + '_target';
            var title = document.getElementById(rlid + '_title').innerHTML;
            var body = document.getElementById(rlid + '_body');

            var count = $jq(body).find("table:first tr").size() - 1;

            var count_span = $jq("<span></span>")
            .text("[" + count + "]");

            var title_span = $jq("<span></span>")

            var a = $jq("<a></a>")
            .attr("href", target)
            .attr("id", rlid + '_link')

            var panel = $jq("div#CustomRLPanelShadow");


            if (relatedlists.size() != i + 1) {
                panel.append("<span class='pipe'> | </span>");


<div class="listHoverLinks" style="visibility: visible;clear:both;text-align:center;" id="CustomRLPanelShadow">

Attribution to: doga
This content is remixed from stackoverflow or stackexchange. Please visit

My Block Status

My Block Content