You need to sign in to do that
Don't have an account?
sales4ce
Tabbed Accounts with Tabs in Focus
Hi,
I have used cook book version of tabbed accounts and wanted to extend that to my custom object as well.
I have a roadblock on getting the focus of the tabs.
What i want is whenever users select "Contact" tab and select New contact, after creation of new contact i want the user to get back to the contact tab and not default landing tab, which is 'detail' tab.
Any ideas on how to accomplish this?
VF Page:
<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" selectedTab=" tabdetails" id="AccountTabPanel" tabClass="activeTab" inactiveTabClass="inactiveTab"> <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>
Thanks,
Sales4ce
One solution is to set the saveURL parameter on the new contact button to point to the page and pass a url parameter indicating which tab to activate.
On the controller you assign the parameter to a variable
activetab=ApexPages.currentPage().getParameters().get('activetab')];
And on the vf page you set the value to that