+ Start a Discussion
Amit Singh.ax1042Amit Singh.ax1042 

Getting Navigation issue in second level tab (which is created with the help of TabPanel).

hi friends,

i am getting problem in navigation


i have created a visualforce page for my Account object... override it with view button of Account Object... when we view any Account record it will display all the related items in Tab (because here i am using Tab panel)


below is my code.

opportunity,contacts(all related items are in the second level tab)... here when we click on any Account record by default it navigate to detail tab... but when i want to create new Contact (i will go to Contact tab)...from there if i will cancel then it goes to detail tab (we should go to contact tab-which was previous one)...

how to solve this issue??



<apex:page standardController="Account" showHeader="true"
      .activeTab {background-color: #236FBD; color:white;
      .inactiveTab { background-color: lightgrey; color:black;
   <apex:tabPanel switchType="client" tabClass="activeTab" inactiveTabClass="inactiveTab" selectedTab="{!}" id="testTabs">
      <apex:tab label="Details" name="AccDetails" id="tabdetails">
         <apex:detail relatedList="false" title="true"/>
      <apex:tab label="Contacts" name="Contacts" id="tabContact">
         <apex:relatedList subject="{!account}" list="contacts" />
      <apex:tab label="Opportunities" name="Opportunities"
         <apex:relatedList subject="{!account}"
      <apex:tab label="Open Activities" name="OpenActivities"
         <apex:relatedList subject="{!account}"
                           list="OpenActivities" />
      <apex:tab label="Notes and Attachments"
                name="NotesAndAttachments" id="tabNoteAtt">
         <apex:relatedList subject="{!account}"
                           list="NotesAndAttachments" />