Find My Salesforce Users by Role Hierarchy

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…

Read more

Learning Ruby for Force.com Developers – Part 3

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…

Read more

Passing Values to JavaScript from Apex Controller Method

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…

Read more

Learning Ruby for Force.com Developers – Part 2

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…

Read more

Fun with Salesforce Collections

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…

Read more

Salesforce REST API Demo from Cloudstock

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…

Read more

Email a Document with Salesforce.com

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!…

Read more

Create and Email a PDF with Salesforce.com

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.…

Read more

Attach a PDF to a Record in Salesforce

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…

Read more

Building a Dynamic Search Page in Visualforce

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…

Read more