Oct 8

First off, let me say what I have told many people already, Watch the DEV401 podcasts on iTunes. They are extremely valuable and a great and simple introduction to Visualforce (at least for non-programmers).

I was meeting with a client the other day and a request was made to have a place where support users can go to see cases in the support queue. Simple right? Click on the Cases tab, change the view to “Support Queue”, click Go. The client understood but wasn’t completely happy – too many clicks.

Light bulb goes off in my head and I say to myself, “I think I can do this using Visualforce!” Except it wasn’t in my head, it was aloud and now the project started.

I gathered my courage and began working. I created the page and opened the page editor. I thought about what I was doing and stared at the “Congratulations” for a couple of minutes. Then I got started.

I updated the page to use the “Case” standard controller. Small Victory! Now I needed to show the queue. At this point I was feeling stressed – how do I write code? How can I display “Show me all cases in the Support Queue”? I knew I could create a view. I then thought, could it be that easy?

The next thing I added was the enhancedList tag. From there I added the required attributes and populated the listid with the view id. Apple-S and done. Now that the page was done, I created a Visualforce tab. Now all the user will have to do is click on the “Support Queue” tab to see all the cases. The client thought is was great and I was relieved.

Here is the point – with the little knowledge that I knew about Visualforce and the helpfulness of the page editor and the Component Reference, I created a Visualforce page. 3 lines of code and I had a solution. I am excited to continue developing more – I play around with a test page and see what the page editor gives me as I type and add spaces and save.

My advice – If I can do it, anyone can do it. Try and you will be impressed as to how far you can go. If you don’t believe me, check out my 3 line solution!

<apex:page standardController="Case" showHeader="true" >
<apex:enhancedList id="View_Name" listId="View_ID" type="Case" height="650"/>

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

one comment so far...

  • James Hemsley Said on October 19th, 2010 at 8:59 am:

    Great post, Jared. I did the online tutorial on Visualforce and built a custom page layout for the “Job Applications” app that’s used in all salesforce training these days. I’m surprised how, once you know the basic functionality, you can build some pretty powerful pages.

leave a reply