Category: Visualforce
Roll Your Own Salesforce “Lookup” Popup Window
August 12th, 2011, 3 Comments
Let’s talk about the standard salesforce.com “lookup” popup window for a few minutes. You know what I’m talking about.. this button right here It’s a handy little button that pops up whenever you need to search for related records. It does a pretty good job but it has some serious drawbacks: It’s virtually impossible to [...]
Dynamically Group & Display Query Results
March 2nd, 2011, 10 Comments
I was working on a Visualforce page that displays the results of a query in separate PageBlock sections based upon a value in the query results. I ran into a small issue which took about an hour or so to solve, so I thought it might make descent blog fodder. The requirement for the page [...]
Neat Salesforce URLFOR Trick
December 28th, 2010, 2 Comments
I was working on an app the other day and had written a custom screen allowing the user to add/edit multiple records on the same page. So in the process I wrote a Visualforce page that Overrides the standard New and Edit functions and redirects the user to this new screen. Here’s my code that [...]
Force.com Programming Best Practices
October 21st, 2010, 23 Comments
Wes and I are adding a few more topics to our Salesforce Handbook before we put it to bed and I thought a great topic would be programming best practices. I’ve never seen a “complete” list of best practices so I thought I would put something together based upon my experiences. I know I’ve [...]
Why is this so DOM Hard?
August 11th, 2010, 16 Comments
Let me start out right away by saying I am not a DOM or CSS master. I’ve typically had employees or co-workers to perform these functions for my so I’ve (unfortunately) let me skills wane. However, I’m not totally clueless. I was trying to build the following Visualforce page a couple of days ago and [...]
Email a Document with Salesforce.com
July 22nd, 2010, 12 Comments
After my last post, Create and Email a PDF with Salesforce.com, I received a few comments whether it was possible to do the same with Document stored in Salesforce.com. Could you choose a Document and then send it via email as an attachment? The short answer is yes! However, I tried to do it from [...]
Create and Email a PDF with Salesforce.com
July 16th, 2010, 25 Comments
This is a continuation of my post a couple of days ago, Attach a PDF to a Record in Salesforce, and shows how to dynamically generate a PDF and attach it to an email. The code is fairly similar and has the same issue with testing the PageReference getContent() method. You can run this demo [...]
Attach a PDF to a Record in Salesforce
July 14th, 2010, 7 Comments
Salesforce.com makes it extremely easy to generate PDF documents on the fly by simply using the renderAs=”pdf” attribute for the <apex:page> component. It’s also a snap to attach these PDFs to records as Attachments. Below is a small Visualforce page and Controller that generates a PDF and saves it to an Account. Note: there is [...]
Building a Dynamic Search Page in Visualforce
July 13th, 2010, 50 Comments
I brushed this code off and thought it might be useful to someone as a starting point for a dynamic search page. It has some cool functionality including passing search criteria via Javascript to the controller, search as you type, sorting of results by clicking on the column header plus much more. Hope you find [...]
Sharing Controller Context with a Visualforce Popup
June 17th, 2010, No Comments
“How do I popup a dialog in Visualforce”. I’m not sure what the deal is but this week I’ve received 3 emails asking me how to open a Visualforce popop window from a Visualforce page but both running in the same session. The question is asked fairly often on the message boards but there isn’t [...]












