Category: Visualforce

Email a Document with Salesforce.com

July 22nd, 2010, 2 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, 1 Comment

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, 4 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, 10 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 [...]

Uploading an Attachment using Visualforce and a Custom Controller

April 28th, 2010, 3 Comments

This is a follow up post to Uploading a Document using Visualforce and a Custom Controller showing an example for uploading an attachment for a Contact. The Visualforce page and Controller is very similar with a few exceptions. Attachments are different than documents and are only available for the following objects: Account Asset Campaign Case [...]

Create a New Record in Force.com Sites

April 27th, 2010, 4 Comments

So someone asked me yesterday for some code to allow external users to create contact records in Salesforce.com. They needed a simple form where people could enter the details and once submitted receive a confirmation of what information was entered. Here’s what the final page that was developed looks like. You can try the code [...]

Uploading a Document using Visualforce and a Custom Controller

April 22nd, 2010, 3 Comments

The Salesforce docs for the inputFile Visualforce component has an example of uploading a document using the Standard Controller. Here is a quick example of using a Custom Controller in case you want to make the upload process part of a larger transaction. Make sure you take a look at the finally block in the [...]

Easily Search and Edit Records with Visualforce

April 7th, 2010, 10 Comments

I tend to over think Visualforce development sometimes and make it harder than it should be. Development with Force.com is surprisingly easy, elegant and quick. For example I recently needed to develop a way for the users to search for records and update specific values. Users should be able to search for records by keyword [...]

Visualforce Row Counter for Iteration Components

April 2nd, 2010, 2 Comments

I have been working on a Visualforce page that displays a list of items from a collection and I want to display the current row number next to each item. I found this post that describes a solution but I think there may be a bug in one of the components so here is proposed [...]

Feed

http://blog.jeffdouglas.com / Visualforce

WordPress Appliance - Powered by TurnKey Linux