You need to sign in to do that
Don't have an account?

Set tabStyle dynamically
Hello,
I am creating a visualforce page, and want to set the tabStyle attribute based on Record Type. However, when open the visualforce page with the following (where MyTabStyle is a string like 'contact', 'account', etc).
<apex:page standardController="Opportunity" extensions="myOppExtension" tabStyle="{!MyTabStyle}">
I get an error "Error: Invalid tabStyle '{!MyTabStyle}' specified. If you are trying to reference a custom Visualforce tab, you must append '__tab'".
Is setting the tabStyle this way supported?
Thank you
Alternatively, you can override standard controller page styles with your own custom stylesheets and inline styles.
link
Thanks for the post Ivivanin - however, this isn't quite what I'm looking for.
The tabStyle is meant to be dynamic, so could be account, opportunity, contact, etc. I'm not looking to use a static value for a custom tab.
Andrew,
Any luck with this?
http://salesforce.stackexchange.com/questions/7488/conditional-tabstyle
Thanks to Jaison Hardy. Hope this helps.