Is it possible to get the tab style from the sObjectType? In other words, if I have an object with a tab icon of "People", the tab style I'd want to return is "Custom15"... Any ideas?

1 Answer 1


There are ways to get to this data, depending on the context.


<apex:page standardController="People__c" tabStyle="People__Tab" ...

Apex Code

Call Schema.describeTabs().


Just call binding.describeTabs() from your application. The documentation includes examples in Java and C#.

  • 2
    You can also use the describeTab feature in native Apex now, no need to import the Partner WSDL, salesforce.com/us/developer/docs/api/Content/… Commented Dec 5, 2013 at 19:07
  • @AndrewFawcett Thanks for that. I somehow missed that in the documentation. Google is still indexing all the old answers about using the WSDL, and that was that last I'd knew of it, too. Time to re-read the manual again!
    – sfdcfox
    Commented Dec 5, 2013 at 19:10
  • I'm intrigued by your Apex Code section. I am trying to recreate the relatedList functionality with a bunch of other features built in (user can sort, filter, export, customize columns, etc). I have a cosmetic desire to replicate the object-related icons as are present natively, but it's not a show-stopper... I've never used wsdl2apex, I'll give that a shot... Commented Dec 5, 2013 at 19:12
  • @AndrewFawcett Also, you linked to the wrong docs in your comment, but I've updated my answer.
    – sfdcfox
    Commented Dec 5, 2013 at 19:13
  • 1
    @NathanWilliams In that case, you can describe them in Apex Code, like Andrew mentioned; I'd store the icon URL in a variable or wrapper object.
    – sfdcfox
    Commented Dec 5, 2013 at 20:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .