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
SL TanSL Tan 

Override Leads Home Page Tab Problem


Hi
I hope someone has done the same thing and can help point out what is wrong with my problem here.
I wanted to change the Lead Home Page Tab to remove the Reports, Tools and Summary portions from the Content area of the Lead Home Tab.
The code from the Lead Home Page is copied using Web Developer View Source and by deleting the parts of the code for the Reports, Tools, Summary and also the left frames for Search, Recent Items, etc and the top frame for the tabs, logos, etc, the resulting Home Page interface looks perfect. However when I click on any of the links for example NEW button in the Content area, the return page includes the left frame and top frame interface within the content portion apart from the New Page.
Could someone help me as to what should I be looking for to amend in the coding? I have tried to look at the various materials available but could not find anything close as to how to solve this issue.
Any pointer will be highly appreciated
Thanks in advance
SL
Greg HGreg H

If you use HREF tags in your links then you should set the TARGET attribute to "_parent".  This will force the click location to the parent of the frame you are in which should resolve your issue.Code:

<a href="/location_to_be_sent" target="_parent">click here</a>

If you are using INPUT tags to create the buttons then you'll probably need to use the ONCLICK attribute to redirect the click to the parent frame.Code:

<input type="button" onclick="JavaScript: parent.location.href = '/location_to_be_sent'">

Hope this helps, -greg

SL TanSL Tan

Hi Greg
Thanks for your kind feedback. I checked on both the HREF and input tags and it seems to be correct. I hope you don't mind if
I copy the code below (which is rather lengthy) and hope you can find some time to help me check what is wrong. All the links work
fine but all the resulting URL pages include the left "search" frames and the top "tabs" inside the content area.
Sorry for any inconvenience caused
SL
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head><title>Enquiries: Home ~ Salesforce - Developer Edition</title>

<script type="text/javascript" src="/static/031907/js/functions.js"></script>

<script src="/dJS/en/1193902475000/library.js" type="text/javascript"></script>

<script type="text/javascript" src="/static/031907/desktop/desktopAjax.js"></script>

<script type="text/javascript">window.sfdcPage = new OverviewPage();
UserContext.initialize({
'locale':'en_US','today':'11/1/2007 1:21 AM','dateTimeFormat':'M/d/yyyy h:mm a','ampm':['AM','PM'],'dateFormat':'M/d/yyyy','startOfWeek':'1','isAccessibleMode':false,'language':'en_US'
});
</script>

<link href="/sCSS/10.0/1193721598000/Theme2/default/elements.css" media="handheld,print,projection,screen,tty,tv" rel="stylesheet" type="text/css" />
<script type="text/javascript">try { DynamicCss.addCssUrl('/sCSS/10.0/1193721598000/Theme2/default/elements.css', 'handheld,print,projection,screen,tty,tv');} catch(e) {}</script>

<link href="/sCSS/10.0/1193721598000/Theme2/default/common.css" media="handheld,print,projection,screen,tty,tv" rel="stylesheet" type="text/css" /><script type="text/javascript">try { DynamicCss.addCssUrl('/sCSS/10.0/1193721598000/Theme2/default/common.css', 'handheld,print,projection,screen,tty,tv');} catch(e) {}</script>

<link href="/sCSS/10.0/1184629367000/Theme2/dStandard.css" media="handheld,print,projection,screen,tty,tv" rel="stylesheet" type="text/css" /><script type="text/javascript">try { DynamicCss.addCssUrl('/sCSS/10.0/1184629367000/Theme2/dStandard.css', 'handheld,print,projection,screen,tty,tv');} catch(e) {}</script>

<link href="/sCSS/10.0/1193901746000/Theme2/00D500000007oGv/00550000000x4Km/dCustom0.css" media="handheld,print,projection,screen,tty,tv" rel="stylesheet" type="text/css" /><script type="text/javascript">try { DynamicCss.addCssUrl('/sCSS/10.0/1193901746000/Theme2/00D500000007oGv/00550000000x4Km/dCustom0.css', 'handheld,print,projection,screen,tty,tv');} catch(e) {}</script><link rel="shortcut icon" href="https://na3.salesforce.com/favicon.ico" />
</head>


<body onLoad="if (this.bodyOnLoad) bodyOnLoad();" onBeforeUnload="if (this.bodyOnBeforeUnload) bodyOnBeforeUnload();" onUnload="if (this.bodyOnUnload) bodyOnUnload();" onFocus="if (this.bodyOnFocus) bodyOnFocus();" class="leadTab overviewPage">

<iframe title="blank - ignore" name="div_submit" id="div_submit" src="/s.gif" style="display:none;visibility:hidden;width:0px;height:0px" frameborder="0"></iframe>


<!-- Main Body Starts Here -->



<form name="sessiontimeout">
<input type="hidden" id="pageLoaded" value="0">
<input type="hidden" id="timeoutText" value="For security reasons, your Salesforce session is about to time out.&lt;br&gt;&lt;br&gt;What would you like to do—" />
<input type="hidden" id="continueButton" value="Continue Working" />
<input type="hidden" id="logoutButton" value="Logout" />
<input type="hidden" id="doTimeoutLocation" value="https://www.salesforce.com/login.jsp–ec=301&startURL=%2Fpage%2Ftimeoutrefresh.jsp%3Fsfdc.setJsDomain%3D1" />
<input type="hidden" id="doNotTimeoutLocation" value="/page/timeoutrefresh.jsp˜sfdc.setJsDomain=1" />
</form>


<script type="text/javascript">

var secondsLeftValue = 5311;
var secondsPopupValue = 5281;
function setSecondsLeft(t) {
secondsLeftValue = t;
}
function setSecondsPopup(t) {
secondsPopupValue = t;
}
function startSessionTimer() {
var p = document.getElementById('pageLoaded');
if (p) {
if (p.value == '0') {
p.value = '1';
schedulePopup(5281);

}
}
}


function schedulePopup(t) {
setTimeout("alertTimeout()", t*1000);
}
function doLogout() {
window.location = '/secur/logout.jsp';
}
var alertWindow = null;
function alertTimeout() {

alertWindow = window.open('/page/timeoutwarn.jsp™sfdc.setJsDomain=1', "_blank", 'width=300,height=200,location=no,dependent=no,resizable=yes,toolbar=no,status=no,directories=no,menubar=no,scrollbars=yes', false);
document.body.onfocus = alertFocus;
}
function alertFocus() {
if (alertWindow) {
if (!alertWindow.closed) {
alertWindow.focus();
} else {
alertWindow = null;
document.body.onfocus = closePopup;
}
}
}

</script>




</table>
<table class="outer" width="100%" id="bodyTable" border="0" cellspacing="0" cellpadding="0">
<!-- Start page content table -->
<tr><td class="oLeft" id="bodyCell">

<!-- Start page content -->

<a name="skiplink"><img src="/s.gif" height='1' width='1' alt="Content Starts Here" class="skiplink" title="Content Starts Here"></a>

<div class="bPageTitle"><div class="ptBody secondaryPalette"><div class="content"><img src="/s.gif" alt="Enquiry" class="pageTitleIcon" title="Enquiry"/>
<h1 class="pageType">Enquiries<span class="titleSeparatingColon">:</span></h1>
<h2 class="pageDescription"> Home</h2>

<div class="blank">&nbsp;</div></div>

<div class="links"><a href="javascript:openPopupFocusEscapePounds('/help/doc/user_ed.jsp?loc=help&target=leads_def.htm&section=Leads&showSplash=true', 'Help', 700, 600, 'width=700,height=600,resizable=yes,toolbar=yes,status=no,scrollbars=yes,menubar=yes,directories=no,location=no,dependant=no', false, false);" class="configLinks" title="Tell me more! (New Window)">Tell me more!</a> | <a href="javascript:openPopupFocusEscapePounds('/help/doc/user_ed.jsp?loc=help&target=leads_overview.htm&section=Leads&showSplash=true', 'Help', 700, 600, 'width=700,height=600,resizable=yes,toolbar=yes,status=no,scrollbars=yes,menubar=yes,directories=no,location=no,dependant=no', false, false);" title="Help for this Page (New Window)"><span class="helpLink">Help for this Page</span><img src="/s.gif" alt="Help" class="helpIcon" title="Help"/></a></div></div>

<div class="ptBreadcrumb"></div></div><div class="filterOverview"><form action="/00Q" id="filter_element" method="GET" name="filter_element" onsubmit="if (window.ffInAlert) { return false; }" >

<div class="bFilterView"><span class="bFilter"><h2>View:</h2>

<span class="fBody"><select id="fcf" name="fcf" onchange="javascript:this.form.submit();" title="View:"><option value="00B50000004PD6P">All Open Enquiries</option>
<option value="00B50000004PD6Q">My Unread Enquiries</option>
<option value="00B50000004PD6S" selected="selected">Recently Viewed Enquiries</option>
<option value="00B50000004PD6R">Today's Enquiries</option>
</select>
<input value=" Go! " class="btn" name="go" onclick="javascript:this.form.submit();" title="Go!" type="button" /></span>

<span class="fFooter"><a href="/ui/list/FilterEditPage?ftype=l&retURL=%2F00Q&cancelURL=%2F00Q%2Fo">Create New View</a></span></span></div></form></div>


<!-- Begin RelatedListElement -->
<div class="bRelatedList">
<!-- Begin ListElement -->

<!-- motif: Lead -->

<!-- WrappingClass -->
<div class="hotListElement"><div class="bPageBlock secondaryPalette"><div class="pbHeader"><form action="/00Q/o" id="hotlist" method="GET" name="hotlist" onsubmit="if (window.ffInAlert) { return false; }" ><table border="0" cellpadding="0" cellspacing="0"><tr><td class="pbTitle"><img src="/s.gif" alt="" width="1" height="1" class="minWidth" title="" /><h3>Recent Enquiries</h3></td><td class="pbButton"><input value=" New " class="btn" name="new" onclick="navigateToUrl('/00Q/e?retURL==%2F00Q%2Fo');" title="New" type="button" /></td><td class="pbHelp"><select id="hotlist_mode" name="hotlist_mode" onchange="submit();" title="Display Selection"><option value="2">Recently Created</option>
<option value="1">My Unread Enquiries</option>
<option value="3" selected="selected">Recently Viewed</option>
</select></td></tr>
</table></form></div><div class="pbBody"><table class="list" border="0" cellspacing="0" cellpadding="0"><tr class="headerRow"><th scope="col" class="">Name</th><th scope="col" class="">Company Name</th><th scope="col" class="">Enquiry Status</th><th scope="col" class="">Enquiry No:</th><th scope="col" class="DateElement">Enquiry Date</th><th scope="col" class="DateElement">Validity Date</th><th scope="col" class="">Product Item</th><th scope="col" class="">Finish Type</th><th scope="col" class="">Owner Alias</th></tr>

<!-- ListRow -->
<tr class=" dataRow even first" onblur="if (window.hiOff){hiOff(this);}" onfocus="if (window.hiOn){hiOn(this);}" onmouseout="if (window.hiOff){hiOff(this);}" onmouseover="if (window.hiOn){hiOn(this);}"><th scope="row" class=" dataCell "><a href="/00Q5000000IQTpw">Pitt, Abraham</a></th><td class=" dataCell "><a href="/00Q5000000IQTpw">Marcel Apparel Co. Ltd</a></td><td class=" dataCell ">Working - Contacted</td><td class=" dataCell ">E-070904/00006</td><td class=" dataCell DateElement">9/3/2007</td><td class=" dataCell DateElement">9/7/2007</td><td class=" dataCell "><a href="/a0550000002ih0A">TC 9052</a></td><td class=" dataCell "><a href="/a08500000016lVN">Moisture Control</a></td><td class=" dataCell "><a href="/00550000000x4Km">SL</a></td></tr> 

</table>
</div><div class="pbFooter secondaryPalette"><div class="bg"></div></div></div></div><div class="listElementBottomNav"></div>
<!-- End ListElement -->
</div>
<!-- End RelatedListElement -->






<!-- Body events -->
<script type="text/javascript">
function bodyOnLoad() {
if (typeof(startSessionTimer)!='undefined') {startSessionTimer(); };
if (typeof(ActivityReminder)!='undefined') {ActivityReminder.initialize([], false, false);};
if ((window.sfdcPage) && (sfdcPage.executeOnloadQueue)){sfdcPage.executeOnloadQueue();};
Cookies.prototype.DeleteCookie('setupopen');
}

function bodyOnBeforeUnload() {
if ((window.sfdcPage) && (sfdcPage.executeOnBeforeUnloadQueue)){sfdcPage.executeOnBeforeUnloadQueue();};
}

function bodyOnFocus() {
closePopup();
}

function bodyOnUnload() {
}
</script> 

 

lee.boonstralee.boonstra
With the following code in top of your script, you will be sure that your page break out of frames:
Code:
<script type="text/javascript">
if (top.location != location) {
     top.location.href = document.location.href ;
}
</script>

 

SL TanSL Tan

Hi Lee.boonstra
Thanks for your kind feedback. I tried to use your suggestion. When I click on the tab, the page opens without the top and left frames but with the content area only filling up the whole window screen. When I click on the links in the content area, it opens the links correctly with the left and top frames and the linked new content . Before putting in your code, when I click the tab, the page opens with the top and left frames and the content area. When I click on any link in the content area, the linked page opens with the top and left frames and the content area also includes the top and left frames inside the content page again. Thus I could not yet solve my problem but I would like to thank you for the suggestion. Maybe I did not explain my problem clearly in my earlier posts. If I cannot solve this, then we will have to make do with the default tab home pages.
Thanks again
SL
CodeTalkerCodeTalker
Hi SL Tan,

I was curious to know if you were able to succesfully override the Leads home tab.
If so, how long did it take to get the frames to display correctly?

I was considering adding more to the tab rather than taking it away.

Thank you!

SL TanSL Tan

Dear Code Talker
We did not pursue this further for our App but I have tested on overriding the Leads Tab using Visual Force and it is successfully done. I would suggest you activate Visual Force in your DE and  use it to make changes to the page as desired.
All the best!
SL
DS777DS777
By overriding - is it done manually and retained after packaging
or the overriding is done programmatically
SL TanSL Tan

The overriding is done manually using Salesforce Override function in the Buttons and Links section of Standard Objects.
Perhaps I can explain the steps I have taken.
First I would assume that you have activated Visualforce in your DE.
Next, under Setup / Develop / Pages /New - fill in label, name, description and put in your code between the apex tag lines in the text box  / Save. (to duplicate a Salesforce Tab page and modify it, what I did was to copy the html code using Web Developer Toolbar  downloaded from Firefox Add-Ons, Click on View Source - Generated Source  and then modify the coding to remove the sections not wanted in the revised Tab Page).
Once the Page is done, next go to your Object whose Tab page you want to override / click on Buttons & Links - you will see the Action - Override  - click on it / select Content Type - Page / and select the Page you have saved above. This overrides the original page with the new Page that you have created.
Not sure if my explanation above helps - do let  me know
Best Regards
SL


DS777DS777
I did that. But will packaging retain the override.
SL TanSL Tan

Oh I see! Sorry I misunderstand you. I have not tried this - sorry I am unable to provide any answer for this.
Hope someone else in this forum have tried and will be able to advice.
Best Regards
SL
SL TanSL Tan

Oh I see! Sorry I misunderstand you. I have not tried this - sorry I am unable to provide any answer for this.
Hope someone else in this forum have tried and will be able to advice.
Best Regards
SL
lopezclopezc
Hi SL,
 
I have followed the steps to override Client Accounts tap. The problem with this is that copying the source you also copy the list of contacts displayed in the table at that time so now, after replacing the tap Client Accounts with my new Visual Force page the contact list displayed is always the same (from the source code obviously). I don't really understand the source code so how could I change this?
 
I have also created this page with apex code, but i don't know how to introduce the New buttom within the header of the table, and the select on the right either.. do you have an idea?
Code:
<!--the list of Contacts-->
<apex:pageBlock title="Recent Client Accounts">
    <apex:pageBlockTable value="{!contacts}" var="contact" cellPadding="4" border="0" rowClasses="dataRow" headerClass="headerRow"  footerClass="pShowMore">
        <apex:column width="500px">
                    <apex:facet name="header">Name</apex:facet>
                    <apex:outputLink value="https://cs2.salesforce.com/{!contact.id}" id="theLink">
                           <apex:outputText value="{!contact.lastname}"/>
                   </apex:outputLink>
        </apex:column>
        <apex:column width="400px">
                  <apex:facet name="header">Account</apex:facet>
                  <apex:outputLink value="/{!contact.AccountId}" >
                           <apex:outputText value="{!contact.account.name}"/>
                   </apex:outputLink>           
        </apex:column>
        <apex:column width="400px">
                  <apex:facet name="header">Phone</apex:facet>
                         {!contact.phone}
        </apex:column>
       <apex:facet name="footer">
            <apex:commandLink action="{!lookMore}" value="Show 10 items" id="theCommandLink"/>            
        </apex:facet>
    </apex:pageBlockTable>
</apex:pageBlock>       
   </apex:form>

 
Many Thanks!
SL TanSL Tan
Hi Lopezc
Thanks for your email. I am sorry I am unable to help you because I am not familiar with using the apex code fully the way you have done below. I hope other readers who are familiar or an expert in this area can offer some advice.
However, I have successfully done new Visualforce page to replace the standard Tab pages and I copy my code below for your perusal for the one I did to replace the standard Contact Tab page. Before that, maybe it will help if I give some background info on what I was trying to do.
I wanted to replace the Contacts (we rename it Customer Contacts) Tab Page with a new one that does not show the "Reports" and "Tools" Sections in the standard Salesforce Contact Tab. Using Web Developer, I copied the html code and then remove all the coding for these 2 Sections and also the header (encompassing the tabs, etc) and side panel sections (encompassing the Search . Recent Items, etc). After saving, and override, I could get the new Contact Tab the way i wanted it.
Hope if I copy my coding for you it may be of some help.
Best Regards
SL
Code:
Code:
<apex:page>
  
<html><head><title>Customer Contacts: Home ~ Salesforce - Developer Edition</title>
<script type="text/javascript" src="/static/102207/js/functions.js"></script>
<script src="/dJS/en/1208396229000/library.js" type="text/javascript"></script><script type="text/javascript" src="/static/102207/desktop/desktopAjax.js"></script>
<script type="text/javascript">window.sfdcPage = new OverviewPage();
UserContext.initialize({
'locale':'en_GB','today':'17/04/2008 12:11','dateTimeFormat':'dd/MM/yyyy HH:mm','ampm':['AM',
'PM'],'dateFormat':'dd/MM/yyyy','startOfWeek':'2','userPreferences':[{
'index':112,'name':'HideInlineEditSplash','value':false
},
{
'index':114,'name':'OverrideTaskSendNotification','value':false
},
{
'index':115,'name':'DefaultTaskSendNotification','value':false
}],'isAccessibleMode':false,'language':'en_US'
});
</script><link href="/sCSS/12.0/1208068638000/Theme2/default/elements.css" media="handheld,print,projection,screen,tty,tv" rel="stylesheet" type="text/css"><script type="text/javascript">try { DynamicCss.addCssUrl('/sCSS/12.0/1208068638000/Theme2/default/elements.css', 'handheld,print,projection,screen,tty,tv');} catch(e) {}</script><link href="/sCSS/12.0/1208068638000/Theme2/default/common.css" media="handheld,print,projection,screen,tty,tv" rel="stylesheet" type="text/css"><script type="text/javascript">try { DynamicCss.addCssUrl('/sCSS/12.0/1208068638000/Theme2/default/common.css', 'handheld,print,projection,screen,tty,tv');} catch(e) {}</script><link href="/sCSS/12.0/1208068944000/Theme2/dStandard.css" media="handheld,print,projection,screen,tty,tv" rel="stylesheet" type="text/css"><script type="text/javascript">try { DynamicCss.addCssUrl('/sCSS/12.0/1208068944000/Theme2/dStandard.css', 'handheld,print,projection,screen,tty,tv');} catch(e) {}</script><link href="/sCSS/12.0/1208329388000/Theme2/00D400000007fZ5/00540000000mR0Q/dCustom0.css" media="handheld,print,projection,screen,tty,tv" rel="stylesheet" type="text/css"><script type="text/javascript">try { DynamicCss.addCssUrl('/sCSS/12.0/1208329388000/Theme2/00D400000007fZ5/00540000000mR0Q/dCustom0.css', 'handheld,print,projection,screen,tty,tv');} catch(e) {}</script><link rel="shortcut icon" href="https://na2.salesforce.com/favicon.ico">
<script src="/js/ClientHash.js" type="text/javascript"></script><script type="text/javascript">var hvch = ClientHash.prototype.needsClientHash('sid_Client', '0000000mR0Q00000007fZ5', '219.95.205.17', '/servlet/servlet.ClientHashValidator—ResponseRequestedURL=%2F003%2Fo');
</script></head><body onload="if (this.bodyOnLoad) bodyOnLoad();" onbeforeunload="if (this.bodyOnBeforeUnload) bodyOnBeforeUnload();" onunload="if (this.bodyOnUnload) bodyOnUnload();" onfocus="if (this.bodyOnFocus) bodyOnFocus();" class="contactTab overviewPage"><iframe title="blank - ignore" name="div_submit" id="div_submit" src="/s.gif" style="display: none; visibility: hidden; width: 0px; height: 0px;" frameborder="0"></iframe>
<!-- Main Body Starts Here -->




<form name="sessiontimeout">
<input id="pageLoaded" value="1" type="hidden">
<input id="timeoutText" value="For security reasons, your Salesforce session is about to time out.&lt;br&gt;&lt;br&gt;What would you like to do–" type="hidden">
<input id="continueButton" value="Continue Working" type="hidden">
<input id="logoutButton" value="Logout" type="hidden">
<input id="doTimeoutLocation" value="https://login.salesforce.com/˜ec=301&startURL=%2Fpage%2Ftimeoutrefresh.jsp%3Fsfdc.setJsDomain%3D1" type="hidden">
<input id="doNotTimeoutLocation" value="/page/timeoutrefresh.jsp™sfdc.setJsDomain=1" type="hidden">
</form>







<script type="text/javascript">

    var secondsLeftValue = 7011;
    var secondsPopupValue = 6981;
    function setSecondsLeft(t) {
        secondsLeftValue = t;
    }
    function setSecondsPopup(t) {
        secondsPopupValue = t;
    }
    function startSessionTimer() {
        var p = document.getElementById('pageLoaded');
        if (p) {
            if (p.value == '0') {
                p.value = '1';
                schedulePopup(6981);
                
            }
        }
    }


    function schedulePopup(t) {
        setTimeout("alertTimeout()", t*1000);
    }
    function doLogout() {
        window.location = '/secur/logout.jsp';
    }
    var alertWindow = null;
    function alertTimeout() {

        alertWindow = window.open('/page/timeoutwarn.jsp?sfdc.setJsDomain=1', "_blank", 'width=300,height=200,location=no,dependent=no,resizable=yes,toolbar=no,status=no,directories=no,menubar=no,scrollbars=yes', false);
        document.body.onfocus = alertFocus;
    }
    function alertFocus() {
        if (alertWindow) {
            if (!alertWindow.closed) {
                alertWindow.focus();
            } else {
                alertWindow = null;
                document.body.onfocus = closePopup;
            }
        }
    }

</script>



<!-- Start page content table -->
<tbody><tr><td class="oRight" id="bodyCell">
<!-- Start page content -->
<a name="skiplink"><img src="/s.gif" alt="Content Starts Here" class="skiplink" title="Content Starts Here" height="1" width="1"></a><div class="bPageTitle"><div class="ptBody secondaryPalette"><div class="content"><img src="/s.gif" alt="Customer Contact" class="pageTitleIcon" title="Customer Contact"><h1 class="pageType">Customer Contacts<span class="titleSeparatingColon">:</span></h1><h2 class="pageDescription"> Home</h2><div class="blank">&nbsp;</div></div><div class="links"><a href="javascript:openPopupFocusEscapePounds('/help/doc/user_ed.jsp?loc=help&target=contacts_def.htm&section=Contacts&showSplash=true', 'Help', 700, 600, 'width=700,height=600,resizable=yes,toolbar=yes,status=no,scrollbars=yes,menubar=yes,directories=no,location=no,dependant=no', false, false);" class="configLinks" title="Tell me more! (New Window)">Tell me more!</a> | <a href="javascript:openPopupFocusEscapePounds('/help/doc/user_ed.jsp?loc=help&target=contacts_overview.htm&section=Contacts&showSplash=true', 'Help', 700, 600, 'width=700,height=600,resizable=yes,toolbar=yes,status=no,scrollbars=yes,menubar=yes,directories=no,location=no,dependant=no', false, false);" title="Help for this Page (New Window)"><span class="helpLink">Help for this Page</span><img src="/s.gif" alt="Help" class="helpIcon" title="Help"></a></div></div><div class="ptBreadcrumb"></div></div><div class="filterOverview"><form action="/003" id="filter_element" method="get" name="filter_element" onsubmit="if (window.ffInAlert) { return false; }"><div class="bFilterView"><span class="bFilter"><h2>View:</h2><span class="fBody"><select id="fcf" name="fcf" onchange="javascript:this.form.submit();" title="View:"><option value="00B40000004x8FM">All Contacts</option>
<option value="00B40000004x8Fp">Birthdays This Month</option>
<option value="00B40000004x8Fw">My Contacts</option>
<option value="00B40000004x8FL" selected="selected">New Last Week</option>
<option value="00B40000004x8Fn">New This Week</option>
<option value="00B40000004x8FV">Recently Viewed Customer Contacts</option>
</select>
<input value=" Go! " class="btn" name="go" onclick="javascript:this.form.submit();" title="Go!" type="button"></span><span class="fFooter"><a href="/ui/list/FilterEditPage?id=00B40000004x8FL&amp;retURL=%2F003&amp;cancelURL=%2F003%2Fo">Edit</a> | <a href="/ui/list/FilterEditPage?ftype=c&amp;retURL=%2F003&amp;cancelURL=%2F003%2Fo">Create New View</a></span></span></div></form></div>
<!-- Begin RelatedListElement -->
<div class="bRelatedList">
<!-- Begin ListElement -->

<!-- motif: Contact -->
<!-- WrappingClass -->
<div class="hotListElement"><div class="bPageBlock secondaryPalette"><div class="pbHeader"><form action="/003/o" id="hotlist" method="get" name="hotlist" onsubmit="if (window.ffInAlert) { return false; }"><table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td class="pbTitle"><img src="/s.gif" alt="" class="minWidth" title="" height="1" width="1"><h3>Recent Customer Contacts</h3></td><td class="pbButton"><input value=" New " class="btn" name="new" onclick="navigateToUrl('/003/e?retURL=%2F003%2Fo');" title="New" type="button"></td><td class="pbHelp"><select id="hotlist_mode" name="hotlist_mode" onchange="submit();" title="Display Selection"><option value="2">Recently Created</option>
<option value="1">Recently Modified</option>
<option value="3" selected="selected">Recently Viewed</option>
</select></td></tr>
</tbody></table></form></div><div class="pbBody"><table class="list" border="0" cellpadding="0" cellspacing="0"><tbody><tr class="headerRow"><th scope="col" class="noRowsHeader">No records available.</th></tr>
</tbody></table>
</div><div class="pbFooter secondaryPalette"><div class="bg"></div></div></div></div><div class="listElementBottomNav"></div>
<!-- End ListElement -->
</div>
<!-- End RelatedListElement -->



<!-- Body events -->
<script type="text/javascript">
function bodyOnLoad() {
 if (typeof(startSessionTimer)!='undefined') {startSessionTimer(); };
 if (typeof(ActivityReminder)!='undefined') {ActivityReminder.initialize([], false, false);};
 if ((window.sfdcPage) && (sfdcPage.executeOnloadQueue)){sfdcPage.executeOnloadQueue();};
}

function bodyOnBeforeUnload() {
 if ((window.sfdcPage) && (sfdcPage.executeOnBeforeUnloadQueue)){sfdcPage.executeOnBeforeUnloadQueue();};
}

function bodyOnFocus() {
 closePopup();
}

function bodyOnUnload() {
}
</script>

<script src="/soap/ajax/12.0/connection.js" type="text/javascript"></script><script src="/soap/ajax/12.0/apex.js" type="text/javascript"></script><script src="/static/102207/apexdebug/log4javascript.js?v=3" type="text/javascript"></script><script src="/static/102207/apexdebug/apexdebuglog.js?v=3" type="text/javascript"></script><script type="text/javascript">try { window.sfdcPage.appendToOnloadQueue(checkDebugLogWindowExists);} catch(e) {}</script>
<!-- End page content -->
</td>
</tr>
</tbody></table>

</body></html></apex:page>

 

lopezclopezc
thanks!

I copied your code but I am still having the same kind of problems. With your code I don't have any records in the list of Contacts, how am I going to retrieve
the information and put it within this list? Also the select View is static so what happen if the user creates a new View?Will I be able to see it in the list? When I click in one option it
doesn't redirect me to anywhere.. Should I create all these functionalities using Javascript?

Many thanks for your help
SL TanSL Tan
Hi Lopezc
I am sorry  I missed some points that I should have mentioned.
I think you should not  be copying my code fully as it is per se. My code is an example for you to peruse. Let me go through the steps that I have used.
Firstly I do hope you are using Firefox and have the Web Developer Toolbar add-on. If so, open your Contact Tab Page. On the Web Developer Toolbar,  select View Source / View Source and this will generate the html code for the Contact Tab Page in another window. Copy the code into your VisualForce page. If you were to override the Contact Tab Page using this code in its entirety at this stage, you will notice that the Header, Side Panel and Bottom Panel will all appear in duplicate on the Contact Tab Page. Next delete the Header, Side Panel and Bottom Panel codings and you will get the result.
Please let me know if this works for you.
Best Regards
SL
lopezclopezc
Yes, That is working but my problem is a different one.
Once I have the source code paste in a new visual force page and I overwrite my old Contact tab page
I see exactly the same list of contacts that I had in the old one. So even if a new contact is created I wouldn't see it in my list because this is an static list..
I think that there is not any javascript function that upload the list... the same for the different Views..
If a new View is created I wouldn't see it. I find it very hard to explain, please ask me if you didn't understand me.




Message Edited by lopezc on 07-11-2008 07:58 AM
SL TanSL Tan
Hi
Perhaps I did not understand your problem fully previously and thanks for clarifying. However I am at a loss at to what is the cause of your problem because I do not have any problem with my listing. By right we should still see the same contacts since these are not deleted but new ones created should be appearing as in my case. I hope some other users reading this thread would be able to assist here.
Sorry about this
Best Regards
SL
GuyClairboisGuyClairbois

Hi,

I was struggling with a similar problem and found this thread. I'm not sure if I understand the problem completely, but looks like you are making this unnecessarily complex. Why not create a simple VisualForce page with the list view? 

 

So the complete page is this (example for Account, easily changed to Leads or Contacts or any other object):

 

 

<apex:page action="{!URLFOR($Action.Account.List, $ObjectType.Account)}"/>

(this comes straight from the VisualForce documentation) 

 

 

To me, looks like the only difference is that this remembers the last List view you used, instead of showing the Most Recently Viewed by default..

 

Hope this is of help to anybody.

Cheers,

Guy

SL TanSL Tan

Hi Guy

Thanks for your information and appreciate your kind response.

I have solved the problem with VF pages since then - the problem occurred in 2007/2008

Best Regards

SL