Category: Code Sample

Demo App – Ruby, Rails & Force.com REST API on Heroku

May 31st, 2011, 2 Comments

So continuing with my learning Ruby series, I finally finished my sample app using the Force.com REST API. I ran into a few issues and fortunately Quinton Wall and Heroku support came to my rescue. Apparently require ‘Accounts’ and require ‘accounts’ aren’t the same when running on Heroku. Go figure. This is a demo Rails [...]

OpportunityAccessLevel Not Writable

March 17th, 2011, 9 Comments

I was working on a project the other day where I needed to dynamically add users to an opportunity’s Sales Team (OpportunityTeamMember object) so that users who do not normally have access to an opportunity based upon Org-wide security settings can work on the opportunity with other team members. One of the advantages of Sales [...]

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 [...]

Find My Salesforce Users by Role Hierarchy

February 15th, 2011, 7 Comments

This is a cool little script that finds “everyone who works beneath me in the role hierarchy”. So you pass the utility class a User ID and it chugs through all of the level beneath that User in the role hierarchy and returns the IDs of all of the users in those roles. Comes in [...]

Learning Ruby for Force.com Developers – Part 3

February 3rd, 2011, 8 Comments

This is part #3 of my adventures of learning Ruby for Force.com developers. If you missed parts #1 and #2 you might want to take a look at those just to get up to speed. Again, these are my goals for this series: Learn Ruby Develop an app locally using Ruby on Rails and the default SQLite [...]

Passing Values to JavaScript from Apex Controller Method

January 17th, 2011, 6 Comments

I’m working on a port of an existing Java app to Salesforce.com and I ran into a Visualforce page that gave me some problems. The current JSP page allows the user to fill out a form, submit a new record to the database and then pop-up a new window to show some results while keeping [...]

Learning Ruby for Force.com Developers – Part 2

January 11th, 2011, 6 Comments

This is part #2 from my adventures of learning Ruby. If you missed part #1 you might want to take a look at it just to get up to speed. Again, these are my goals for this series: Learn Ruby Develop an app locally using Ruby on Rails and the default SQLite database Modify the [...]

Fun with Salesforce Collections

January 6th, 2011, 6 Comments

The Apex language provides developers with three classes (Set, List and Map) that make it easier to handle collections of objects. In a sense these collections work somewhat like arrays, except their size can change dynamically, and they have more advanced behaviors and easier access methods than arrays. If you are familiar with the Java [...]

Salesforce REST API Demo from Cloudstock

December 17th, 2010, No Comments

This is the demo that I put together for the Cloudstock Hackathon and I tried to throw in as many partner services as possible. I finally ended up with five so it was dubbed the “Kitchen Sink” demo. I thought some people may find it useful as it shows how to use the Force.com REST [...]

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 [...]

Feed

http://blog.jeffdouglas.com / Code Sample

WordPress Appliance - Powered by TurnKey Linux