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
AparnaUpadhayayAparnaUpadhayay 

Tabbed Opportunity Page

Hi,

 

I have a requirement in which my VF page will be redirected according to the record types. I was able to do this, but my VF page is not working now. I am using Tabbed functionality in VF page. And after redirection, tabs are not working. Any idea what should be done?

 

My VF page is: 

 

<apex:page sidebar="true" standardController="Opportunity" tabStyle="Opportunity" extensions="OpportunityRedirectExtension"
action="{!nullValue(redir.url, urlFor($Action.Opportunity.View, opportunity.id, null, true))}">

<style>
.activeTab {background-color: rgb(23, 151, 192); color:white; background-image:none}
.inactiveTab {background-color: lightgrey; color:black; background-image:none}
</style>

<apex:tabPanel switchType="client" tabClass="activeTab" inactiveTabClass="inactiveTab" >
<apex:tab label="Opportunity">
<apex:detail relatedList="true" relatedListHover="false"/>
</apex:tab>
<apex:tab label="Financial Summary">
<apex:pageBlock mode="maindetail" tabStyle="Opportunity" title="Financial Summary">
<apex:pageBlockButtons location="Top">
<apex:form >
<apex:commandButton action="{!edit}" value="Edit" />
<apex:commandButton action="{!delete}" value="Delete"/>
</apex:form>
</apex:pageBlockButtons>

<apex:pageBlockSection title="Deal Revenue" collapsible="true">
<apex:pageBlockSectionItem >
<apex:outputLabel value="Total Deal Value GP" />
<apex:outputLabel value="" />
</apex:pageBlockSectionItem>
<apex:outputField value="{!opportunity.Revenue_Type__c}"/>
<apex:outputField value="{!opportunity.Annual_Recurring_Revenue__c}"/>
<apex:outputField value="{!opportunity.Revenue_Value__c}"/>
<apex:outputField value="{!opportunity.NX_MRR__c}"/>
<apex:outputField value="{!opportunity.Total_Order_Revenue__c}"/>
<apex:outputField value="{!opportunity.GDO_Offering_Value__c}"/>
<apex:outputField value="{!opportunity.Total_Install_Revenue__c}"/>
<apex:outputField value="{!opportunity.NRR__c}"/>
<apex:pageBlockSectionItem />
</apex:pageBlockSection>
<apex:pageBlockSection title="Commissionable Revenue" collapsible="true">
<apex:outputField value="{!opportunity.Base_ARR__c}"/>
<apex:outputField value="{!opportunity.Total_Commisions__c}"/>
<apex:outputField value="{!opportunity.Incremental_ARR__c}"/>
<apex:outputField value="{!opportunity.NX_ARR__c}"/>
</apex:pageBlockSection>
<apex:pageBlockSection title="Contract Information" collapsible="true">
<apex:outputField value="{!opportunity.GDO_Primary_Offering__c}"/>
<apex:outputField value="{!opportunity.Validation_Failure_Reason_s__c}"/>
<apex:outputField value="{!opportunity.Contract__c}"/>
<apex:outputField value="{!opportunity.Delivery_Organization__c}"/>
<apex:outputField value="{!opportunity.Contract_Length_No_of_Months__c}"/>
<apex:outputField value="{!opportunity.Delivery_Team__c}"/>
<apex:outputField value="{!opportunity.DRP_Deal_Name__c}"/>
<apex:pageBlockSectionItem />
<apex:outputField value="{!opportunity.EPS_Model__c}"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:tab>
<apex:tab label="Xerox Offering">
<apex:relatedList list="OpportunityLineItems" />
<apex:relatedList list="Equipment_Data__r" />
<apex:relatedList list="VQX_Import_Object__r" />

</apex:tab>
<apex:tab label="Activities / Milestones">
<apex:relatedList list="OpenActivities" />
<apex:relatedList list="ActivityHistories" />
</apex:tab>
<apex:tab label="Synergy">
<apex:pageBlock mode="maindetail" tabStyle="Opportunity">
<apex:pageBlockSection title="Synergy Detail" collapsible="true">
<apex:outputField value="{!opportunity.Primary_Synergy_Leveraged__c}"/>
<apex:outputField value="{!opportunity.User__c}"/>
<apex:outputField value="{!opportunity.Originator_Email__c}"/>
<apex:outputField value="{!opportunity.Relationship_Status__c}"/>
<apex:outputField value="{!opportunity.ACS_Delivery_Groups__c}"/>
<apex:outputField value="{!opportunity.Suggested_NRR__c}"/>
<apex:outputField value="{!opportunity.Suggested_ARR__c}"/>
<apex:outputField value="{!opportunity.ACS_Lead__c}"/>
<apex:outputField value="{!opportunity.ACS_Sales_Lead_Email__c}"/>
<apex:outputField value="{!opportunity.Cross_Sell_Qualified__c}"/>
<apex:outputField value="{!opportunity.Cross_Sell_Deal__c}"/>
<apex:outputField value="{!opportunity.Cross_Sell_Lead__c}"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:tab>
<apex:tab label="Alliance">
<apex:pageBlock mode="maindetail" tabStyle="Opportunity">
<apex:pageBlockSection title="Alliance Detail" collapsible="true">
<apex:outputField value="{!opportunity.Alliance_Comments__c}"/>
<apex:outputField value="{!opportunity.Alliance_Mgmt_Close_Date_Forecast__c}"/>
<apex:outputField value="{!opportunity.Alliance_Partner_Type__c}"/>
<apex:outputField value="{!opportunity.Forecast_by_Alliances_Mgmt__c}"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:tab>
</apex:tabPanel>

</apex:page>

 

And Controller is:

 

public class OpportunityRedirectExtension {
public OpportunityRedirectExtension(ApexPages.StandardController controller) {
this.controller = controller;
}

public PageReference getRedir() {
Opportunity opp = [Select id, recordtypeid From Opportunity Where Id = :ApexPages.currentPage().getParameters().get('id')];
PageReference newPage;

if (opp.recordtypeid == '0122000000095ne') {
newPage = new PageReference('/apex/MyOpportunity?id='+opp.id+'&sfdc.override=1');
}
else{
newPage = new PageReference('/' + opp.id);
newPage.getParameters().put('nooverride', '1');

}
newPage.getParameters().put('id', opp.id);
return newPage.setRedirect(true);
}

private final ApexPages.StandardController controller;
}

 

 

This is an urgent requirement.