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
learnSFlearnSF 

tabbed view with related list

I wonder if it is possible to go back to the tab that you were previously on if you access a related list from the tabbed layout.
 
Like I have two tab on page layout. first is summary and second is opportunity.
 
when user click on opportunity tab and click on any of opportunity form tabeed page,it will redirect to opportunity page.when user click back button on browser,the tabeed apge view summary tab.
 
I want when user click back button,opportunity page should be redirect to opportunity tab instead of summary tab.
 
Can it be possible in visual force page?
learnSFlearnSF

Here is my code.

 

<apex:page standardController="Account" extensions="MyControllerExtension" showHeader="true" tabStyle="account" > <apex:outputPanel rendered="true"> <style> .activeTab {background-color: #236FBD; color:white; background-image:none} .inactiveTab { background-color: lightgrey; color:black; background-image:none} </style> <apex:sectionHeader title="{!account.name}"> </apex:sectionHeader> <c:PersonalTag ></c:PersonalTag> <apex:tabPanel switchType="client" selectedTab="tabdetails" id="AccountTabPanel" tabClass="activeTab" inactiveTabClass="inactiveTab"> <apex:tab label="Summary" name="Summary" id="tabminiSummary" > <apex:pageBlock title="Summary" > <apex:pageBlockSection title="Summary" columns="2"> <apex:outputLabel value="Account Owner" for="theTextOutput"/> </apex:pageBlockSection> </apex:pageBlock> </apex:tab> <apex:tab label="Opportunities" name="Opportunities" id="tabOpp" > <apex:relatedList subject="{!account}" list="opportunities" /> </apex:tab> </apex:tabPanel> </apex:outputPanel> </apex:page>

 

Ron HessRon Hess

I tried a number of ways and am not able to get the back button to reload the page view state.

 

Basicaly the jump to the opportunity moves the visualforce page out of the browser, so next time you go back it's a fresh page load. 

 

the only thing that i can think of is to pass a parameter on the query string something like this: 

 

https://tapp0.salesforce.com/apex/boardtabs?id=001T0000003zugD&tab=Opportunities

 

then in your code, look for tab= and set the value of the tabpanel so that the opportunity tab is active.

 

This method requires a full page refresh each time you click on a tab, so that you can put a new parameter on the query string.  However i tried to get this to work and got stuck, it appears there is no way to set an action on the change of a tab panel.

 

sorry, any one else know how to make this work?