Uploading an Attachment using Visualforce and a Custom Controller

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…

Read more

Create a New Record in Force.com Sites

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…

Read more

Uploading a Document using Visualforce and a Custom Controller

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…

Read more

Easily Search and Edit Records with Visualforce

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…

Read more

Visualforce Row Counter for Iteration Components

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…

Read more

Passing Parameters with a CommandButton

This post is a slight tweak of yesterday's post, Passing Parameters with a CommandLink. In theory you should just be able to switch out the CommandLink component with a CommandButton component and be golden. However, not so fast. There seem to still be a bug with the CommandButton component.Here…

Read more

Passing Parameters with a CommandLink

Here's a small example of how you can pass a value to another method via a command link for Salesforce.com. When the link is clicked, the setter fires for the public member nickName. The button click then calls the processLinkClick method where you can do something like process the…

Read more

Using List Custom Settings in Salesforce.com

Salesforce.com recently introduced Custom Settings in Winter '10 which allows you to store custom data sets and associate them on an org-wide, profile or user basis. Custom Settings are essentially custom objects that are exposed in the applications cache and are accessible via their own API. You can certainly…

Read more

Calling a REST Web Service (JSON) with Apex

Cross-posted at the Appirio Tech Blog. Using JSON RESTful Web Services with Salesforce.com opens up your org to a number third-party integration opportunities (Google, Yahoo!, Flickr, bespoke, etc.). JSON support isn't baked into the Force.com platform but Ron Hess at Salesforce.com has created a JSON parser which…

Read more

Using Relationships in Visualforce Pages

The topic of relationships in Visualforce pages came up on the Salesforce developer discussion boards the other day so I thought I'd throw something together to expand on the topic. Let's say you want to print off a Sales Order or Purchase Order as a PDF. You can use the…

Read more