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
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"
      tabStyle="account">
     
     
     
   <style>
      .activeTab {background-color: #236FBD; color:white;
         background-image:none}
      .inactiveTab { background-color: lightgrey; color:black;
         background-image:none}
   </style>
   <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>
      <apex:tab label="Contacts" name="Contacts" id="tabContact">
         <apex:relatedList subject="{!account}" list="contacts" />
      </apex:tab>
      <apex:tab label="Opportunities" name="Opportunities"
                id="tabOpp">
         <apex:relatedList subject="{!account}"
                           list="opportunities"/>
      </apex:tab>
      <apex:tab label="Open Activities" name="OpenActivities"
                id="tabOpenAct">
         <apex:relatedList subject="{!account}"
                           list="OpenActivities" />
      </apex:tab>
      <apex:tab label="Notes and Attachments"
                name="NotesAndAttachments" id="tabNoteAtt">
         <apex:relatedList subject="{!account}"
                           list="NotesAndAttachments" />
      </apex:tab>
   </apex:tabPanel>
 
  
</apex:page>