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
LloydSLloydS 

Displaying custom view when user clicks on standard object tab

I believe this is easily accomplished using a Visualforce page but I cannot find any reference to previous posts. So I could use some help getting started.

 

When users click on the Cases tab, we simply want a custom view displaying all open cases rather than all recent cases. They still need the other functionality on the Cases tab, just change the view from recent to open.

 

I tried accomlishing this by creating a custom web tab using a javascript reference to the URL for the custom view to be displayed. But it created a cross site scripting error.

splitsplit

1. Create VF page, when standardController="XXX__c"

2. Click Setup | Create | Objects | XXX | Buttons and Links

3. In the Standard Buttons and Links related list, click Edut next to XXXTab.

4. For Override With select Visualforce Page.

5. From the Visualforce Page drop-down list, select tabbedAccount.

6. Click Save.

:smileyhappy:

 http://www.salesforce.com/us/developer/docs/pages/Content/pages_quick_start_tabs.htm

 

LloydSLloydS

I found a post on a blog page that had an example of doing this using javascript. However, in the version below it's loading a blank page when a user clicks on the Case tab.

 

 

<apex:Page tabStyle="Case" > <script src="/soap/ajax/15.0/connection.js"></script> <script type="text/javascript" /> <script> window.onload = function() { sforce.connection.sessionId = '{!$Api.Session_ID}'; var describeSObjectResult = sforce.connection.describeSObject("case"); var prefix = describeSObjectResult.keyPrefix; var cView = "00BA0000001TxJ6"; } // Change the whole window to point to this location parent.document.location.href = "/" + prefix + "?fcf=" + cView ; } </script> </apex:page>