Category: Visualforce

Uploading an Attachment using Visualforce and a Custom Controller

April 28th, 2010, 7 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, 10 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, 8 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, 15 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, 3 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 [...]

Passing Parameters with a CommandButton

March 4th, 2010, 9 Comments

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 is the Visualforce page with [...]

Passing Parameters with a CommandLink

March 3rd, 2010, 5 Comments

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 variable further with DML statement or [...]

Using List Custom Settings in Salesforce.com

January 7th, 2010, 29 Comments

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 build your own custom objects to [...]

Calling a REST Web Service (JSON) with Apex

January 6th, 2010, 8 Comments

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 will do the heavy lifting for you. Last [...]

Using Relationships in Visualforce Pages

December 16th, 2009, 6 Comments

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 parent and child relationships inherent [...]

Feed

http://blog.jeffdouglas.com / Visualforce

WordPress Appliance - Powered by TurnKey Linux