• Home
  • About
    • Leadership
    • Partners
    • Blogroll
  • Force-Squared Blog
    • Tips and Tricks
    • Configuration
    • Development
  • Support
    • Knowledge Base
    • Submit a Case
  • Is It Dreamforce Yet?

X-Squared On Demand

Salesforce solutions delivered

  • Home
  • About
    • Leadership
    • Partners
    • Blogroll
  • Force-Squared Blog
    • Tips and Tricks
    • Configuration
    • Development
  • Support
    • Knowledge Base
    • Submit a Case
  • Is It Dreamforce Yet?
  • Tips and Tricks
  • Configuration
  • Development
You are here: Home / Salesforce CRM / Configuration / The Ultimate Visualforce Events Tab – Almost

The Ultimate Visualforce Events Tab – Almost

January 5, 2009 by David Schach 5 Comments

Check old blog posts, and you’ll see that I’ve been working on custom Events and Task tabs for a while now. A Task Visualforce tab (that mimics the Task box on the Home Page) is almost ready to come out, but the Events Enhanced List tab is (pretty much) here!

This bears emphasizing: Enhanced Lists were initially not fully released for Activity/Event/Task objects, but are available now.

The code is ridiculously simple, thanks to the apex:EnhancedList Visualforce tag:

<apex:page standardController="Task" >
<apex:enhancedlist type="Activity" height="800" rowsPerPage="50" />
</apex:page>
See? Nothing to it! Or so we thought. There are some catches (there always are):

  1. The original use-case required displaying all upcoming events without the header or sidebar. We still cannot do this. Quoting from the Winter ’09 Release Notes: The enhancedList component is not allowed on pages that have the attribute showHeader set to false.
  2. We’d like to create a custom tab for this page. We create a Visualforce Tab, pick a custom icon, and show the page… and when I click on the tab, the enhanced list is displayed, but the tab is not highlighted. Also, the custom icon I chose is not displayed. How do we highlight our tab?
    After making the page, we make the tab as desribed above. Then we RETURN to the page and add a tabstyle modifier to the apex:page tag, like so:
    <apex:page standardController="Task" tabstyle="enhanced_activities__tab">
    <apex:enhancedlist type="Activity" height="800" rowsPerPage="50" />
    </apex:page>
    
    [Of course, change the tab name to whatever you choose.]

    Success? Not quite. There’s another catch:

  3. The tab is highlighted (brown in our case), but the color and icon for the enhanced list are standard green/home.
    Sadly, I have no workaround for this one. Sorry.
To repeat: Enhanced lists were not initially fully available for Events and Tasks, but now do support them.

Moving forward, consider if you want to create a particular enhanced list view instead of calling the standard enhanced Activity list as I have done here. If you would prefer to make a custom enhanced list view, then you will need to add more code, but that is beyond the scope of this post.

Enjoy!

Share this:

  • Click to share on X (Opens in new window) X
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to share on Facebook (Opens in new window) Facebook
  • Click to share on Pocket (Opens in new window) Pocket
  • Click to email a link to a friend (Opens in new window) Email

Related

Filed Under: Configuration, Salesforce, Visualforce, Winter 09 Tagged With: Apex, Force.com Builder, Force.com Platform, Salesforce, Visualforce

← Force.com Sites Guest User Profile Permissions Ubiquity Plugin for developer.force.com →

Comments

  1. Ron Hess says

    January 5, 2009 at 19:41

    David, for #3 you can set the color using css, something like this

    .individualPalette .taskBlock .primaryPalette { border-color:#6D6002; background-color:#6D6002; }

    Reply
  2. MD1 says

    January 6, 2009 at 15:56

    Excellent read as always!

    Reply
  3. Tim Smith says

    January 7, 2009 at 00:08

    Another option for #3 is to use a custom tab style and choose a green color for that style. I did this for my activities tab and it looks great.

    Reply
    • David Schach says

      January 7, 2009 at 18:00

      I hear you, but being limited to one color goes against the flexibility that Visualforce development depends on. If I were content to stick with green, then that would be fine, but I want to follow my regular Salesforce CRM mantra, “Anything is possible with enough hours and brain cells.” Sorry, but if I want brown, I deserve brown!

      Reply

Trackbacks

  1. Solving Simple Problems: Salesforce Activities as a Tab | Radial Web says:
    September 30, 2010 at 09:16

    […] I mentioned before that the Salesforce community is awesome. @dschach has another great post on his website addressing the same issue and @geraldinegray pointed out that this type of tab is […]

    Reply

Share Your ThoughtsCancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Is it Dreamforce Yet?

Find out!

Find us on the AppExchange

Mass Update Contacts 2.0

Get It Now

Recent Posts

  • Prevent Duplicate Emails on Leads
  • Duplicate Record Item Enrichment and Auto-Deletion Code
  • Lightning Component With Running User Information
  • ChatterBINGO is Now Open-Source
  • Display Only My Role’s Records on a Report

Post Categories

Popular Tags

#df09 #df10 Akismet Apex AppBuilder AppExchange Appirio Astadia Blogs Chatter Configuration Content DreamFactory Dreamforce Eclipse IDE Enterprise Force.com Builder Force.com Platform Google Infowelders Integration Just for fun Lightning New Developments New Features Partner Program PersonAccount Projects Publisher Salesforce Salesforce1 Salesforce for Google Apps sfdcverse Sites Visualforce Web-to X-Squared On Demand

Find Us Online

  • Twitter
  • Facebook
  • LinkedIn
  • RSS

Subscribe

RSS Feed Comments

Subscribe via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 164 other subscribers

Copyright © 2008–2025 X-Squared On Demand · Genesis Framework by StudioPress · WordPress · Log in