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
Robert Davis 1Robert Davis 1 

Tab on Custom VisualForce Page does not Appear - 4 Lines of Visualforce that have me Confused

I am attempting to add a tab to a custom visual force page someone put together from what appears is this article http://ttps://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_quick_start_tabs.htm

When I go to the classic Salesforce view the object shows in as a related list to Accounts.
When I remove any of the other tabs in the code they disappear, but when I copy a tab's code and copy it into the code with a new id name it does not appear as a new tab.
I have checked object permissions and pagelayout assignment and they seem correct.

Question : Why is my tab (named CS_Division) not showing up? I am not sure how much of the code you need to see so I will put the tab code and then the entire code in hopes it makes it easier to read.
 
<apex:tab label="C S Div" name="CS_Division" id="CSD">
        <apex:relatedList subject="{!account}" list="CS_Rev_Div2s__r"
               rendered="{!$ObjectType.CS_Rev_Div2__c.accessible}"/>
</apex:tab>

The entire page code:
 
<apex:page standardController="Account" action="{!IF(NOT(CONTAINS($Profile.Name,'LEX')),
    null, 
    urlFor($Action.Account.View, account.id,
    null, true))}"
    showHeader="true" tabStyle="account" >
<apex:form >
<apex:inputfield value="{!Account.hidden__c}" style="width:1px; height: 1px" required="false" onfocus="true" />
</apex:form>
<!-- chatter component for follow link only - using the feed component instead
<chatter:follow entityId="{!Account.ID}"/>
-->
<chatter:feedWithFollowers entityId="{!Account.Id}" />
   <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:outputpanel rendered="{!CASESAFEID(Account.RecordTypeId)='012000000003LLAAQ'}">

      <apex:tabPanel switchType="client" selectedTab="tabdetails" id="AccountTabPanel" tabClass="activeTab" inactiveTabClass="inactiveTab">   
      <apex:tab label="{!$Label.Details}" name="AccDetails" id="tabdetails" >
    
          <apex:detail subject="{!account.Id}" relatedList="false" title="false" inlineEdit="true"/>

       
          <apex:relatedList subject="{!account}" list="Interviews__r" 
                     rendered="{!$ObjectType.Exit_Interview__c.updateable}"/>
                      <apex:outputLink value="/{!Account.PreviousMORID__c}/e?clone=1&retURL=%2F" id="theLink" rendered="{!account.PreviousMORBID__c != ''}" target="_parent" >MOR from Previous</apex:outputLink>

 <apex:outputLink value="/apex/morbnew?CF00N00N3030303000000008stWP={!account.Name}&CF00N3030303009stWP_lkid={!account.Id}&scontrolCaching=1&retURL=%2Fapex%2FtabbedAccount%3Fid%3D{!account.Id}%26sfdc.override%3D1&sfdc.override=1" rendered="{!account.PreviousmorBID__c == ''}" target="_parent" >Monthly Operations Report</apex:outputLink>
&nbsp;
<apex:outputLink value="/apex/EditableContactList?ID={!Account.ID}" id="SurveyPLan" rendered="{!account.Submit_Survey_Plan_October_2015__c != TRUE}" target="_parent" >Survey</apex:outputLink>
      </apex:tab>
      
     
     <apex:tab label="{!$Label.Account_Team}" name="AccountTeamMembers" id="tabAccountTeam">
      <apex:relatedList subject="{!account}" list="accountteammembers" />
      </apex:tab>
      

      <apex:tab label="{!$Label.Contacts}" name="Contacts" id="tabContact">
      <apex:relatedList subject="{!account}" list="contacts" 
       rendered="{!$ObjectType.contact.accessible}"/>
      </apex:tab>
      
      
      
       <apex:tab label="{!$Label.Opportunities}" name="Opportunities" id="tabOpp">
         <apex:relatedList subject="{!account}" list="opportunities" 
         rendered="{!$ObjectType.opportunity.accessible}"/>
      </apex:tab>
      
      <apex:tab label="{!$Label.Notes_and_Attachments}" name="NotesAttachments" id="tabNotesAttachments">
      <apex:relatedList subject="{!account}"  list="CombinedAttachments" />
      </apex:tab>
      
      <apex:tab label="{!$Label.Open_Activities}" name="OpenActivities" id="tabOpenAct">
         <apex:relatedList subject="{!account}" list="OpenActivities" />
      </apex:tab>
      
      <apex:tab label="{!$Label.Activity_History}" name="History" id="tabActivityHistory">
         <apex:relatedList subject="{!account}" list="ActivityHistories" />
            </apex:tab>
            
            <apex:tab label="Account History" name="Field History" id="fieldhistory">
      <apex:outputLink value="/_ui/common/history/ui/EntityHistoryFilterPage?id={!account.id}">Click to view Account History</apex:outputLink>
        </apex:tab>

           

       <apex:tab label="Account Alerts" name="AcctAlerts" id="tabAccountAlerts">
         <apex:relatedList subject="{!account}" list="AcctAlerts__r" 
             rendered="{!$ObjectType.Acct_Alert__c.accessible}"/>
         
      </apex:tab>
      <apex:tab label="Wallet Share" name="WalletShare" id="tabWalletShare">
         <apex:relatedList subject="{!account}" list="Wallet__r" 
         rendered="{!$ObjectType.WalletShare__c.accessible}"/>
      </apex:tab>
      
      
      <apex:tab label="Client Concerns" name="CSurveys" id="CSurveys">
         <apex:relatedList subject="{!account}" list="CSurveys__r" 
            rendered="{!$ObjectType.CSurvey__c.accessible}"/> 
            <apex:relatedList subject="{!account}" list="CPlans__r" 
            rendered="{!$ObjectType.CPlan__c.accessible}"/>
              <apex:relatedList subject="{!account}" list="CForms__r" 
            rendered="{!$ObjectType.CForm__c.accessible}"/>
      </apex:tab>    

    <apex:tab label="Monthly Operations Reporting" name="Weekly_Account_Updates1" id="MOR">
     <center>

<!-- NEW CODE BELOW -->
    <apex:tab label="C S Div" name="CS_Division" id="CSD">
        <apex:relatedList subject="{!account}" list="CS_Rev_Div2s__r"
               rendered="{!$ObjectType.CS_Rev_Div2__c.accessible}"/>
    </apex:tab>
</apex:page>
I appreciate you taking a look at this and would appreciate all feedback.

Thank you.

Robert
 
Best Answer chosen by Robert Davis 1
Robert Davis 1Robert Davis 1
Well, after several hours, I learned something very valuable. I went back to the overridden page and it was still the original page and not the new page I was trying to create. I guess it always means going back to basics. Two hours I will never get back. Thanks