I don't want to see "Recent Accounts"!

posted Jul 1, 2011, 12:19 PM by Ezra Kenigsberg   [ updated Jul 1, 2011, 12:53 PM ]

#DataTipOfTheDay 2011-07-01

Q: "How do I override the 'Recent Accounts' view when I click the Accounts tab?"

A: I don't know a point-and-click way to do this. It can be done by replacing the tab with a five-line Visualforce page:
  1. Navigate to the Accounts tab
  2. Choose the View (eg, "All Accounts") that you want to appear when you click the Accounts tab
  3. Copy everything in the URL after "https://xxx.salesforce.com"
  4. Navigate to Setup | Develop | Pages
  5. Click the "New" button
  6. Give the new Page a Label and Name that describes the View, like "All Accounts". Remember that Name, unlike Label, can contain only letters, numbers, and underscores.
  7. Copy-and-paste the following text into the Visualforce Markup area, replacing the red text with the URL fragment you copied in step 3:
         <script type="text/javascript">
  8. Click Save
  9. Navigate to Setup | Create | Tabs
  10. Click the "New" button in the "Visualforce Tabs" section
  11. Select the Visualforce Page you just created from the picklist, and choose whatever Tab Label, Tab Name, and Tab Style you like
  12. Click the "Next" button
  13. Activate/deactivate the Tab for the relevant Profiles and click the "Next" button
  14. Activate/deactivate the Tab for the relevant Apps and click the "Save" button
  15. Hide the standard Accounts tab from all desired Apps (Setup | Create | Apps) and/or Profiles (Setup | Manage Users | Profiles)
That should do it!

This approach works with any object, not just Accounts.