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
Thennakon Witharanage AnushaThennakon Witharanage Anusha 

Tab for a record type

Can we add Tab for a record type?
Hi ,

You can create a VF tab for this purpose.
If you're trying to have separate Salesforce List View pages for each RecordTypes, e.g. trying to stick with the enhancedList component, you're probably out of luck without a lot of custom coding.
However, if you'd basically just like to replicate standard "Tab" page functionality, you could do this a couple ways:
With Visualforce, using an extension controller to pull in only records of a desired RecordType, and then displaying the records however you'd like, such as with a simple apex:pageBlockTablelooping over the records you queried for in the extension controller. Then create a separate Visualforce tab and corresponding page for each RecordType. You could probably optimize this process, if the desired "Tab" page output is the same for each RecordType, by abstracting the code for the extension controller where you query for just records of a particular RecordType, into a Visualforce Component, so that you could do something like this in each of your Visualforce Tabs:
 <c:recordTypeTab objectType="Account" recordTypeDeveloperName="Business_Account"/>