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 > |
- 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.
- 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:[Of course, change the tab name to whatever you choose.]<
apex:page
standardController
=
"Task"
tabstyle
=
"enhanced_activities__tab"
>
<
apex:enhancedlist
type
=
"Activity"
height
=
"800"
rowsPerPage
=
"50"
/>
</
apex:page
>
Success? Not quite. There’s another catch:
- 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.
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!
David, for #3 you can set the color using css, something like this
.individualPalette .taskBlock .primaryPalette { border-color:#6D6002; background-color:#6D6002; }
Excellent read as always!
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.
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!