Auto-Approval in a Multi-Step Salesforce Approval Process
You’ve been tasked with writing an approval process. If an opportunity meets the entry criteria (Stage Name = Pre-Contract) and has an Amount greater than $1000, it needs to be approved by either Bobby or Billy in Sales Management, and if it has an Amount less than or equal to $1000, it needs auto-approval in Salesforce. (We’ll leave the A
Easy Geocoding in Summer ’16
In the past, if you've wanted to geocode (that is, to store the longitude and latitude for) address fields in Salesforce, you've probably had to go to great pains to do so. In fact, in a Salesforce webinar that Kartik Viswanadha and I recently presented, we discussed several techniques for using Asynchronous Apex with callouts to an external w
Simplifying Sandbox Refreshes
At OpFocus, our Apex developers often work in newly refreshed Developer sandboxes. Often, though, we’re faced with a challenge: after a Developer sandbox is refreshed/activated, it lacks required reference data. Here are a few scenarios: The org has a custom object that lists postal codes and their tax rates. An Opportunity trigger requi
Button, Button, Who’s Got The Button?
“Button, button, who’s got the button?” is a children’s game in which one child hides a button in one of his or her hands, and another child tries to guess which hand it’s in. (Yes, before iPhones, children did indeed play games like this!) Believe it or not, there’s an equivalent game in Lightning Experience. Mass A
What Does Salesforce Lightning Experience Mean to Me?
Lightning Experience looks amazing! It’s a clean, crisp, modern user interface. Salesforce has clearly given a lot of thought to what users (especially Sales users) need to be able to see and do in order to perform their jobs most efficiently, and they’ve clearly made a huge investment in making it all work. The Big Announcement notwith
Aggregate Query has too many rows for direct assignment, use FOR loop
It’s an interesting error message, isn’t it? The implication is that, somewhere, my Apex code is doing an aggregate query, and while it’s returning not enough rows to generate a governor limit error, it is somehow returning enough rows to generate this error. The only problem is that, in my case, I’m not doing an aggregate query at
Time-based Workflow that’s Evaluated Every Time a Record is Saved
Imagine that you're creating a workflow rule that has a time-based action. You want to set the rule's Evaluation Criteria to "Evaluate the rule when a record is created, and every time it's edited," but Salesforce tells you, "You cannot add time-dependent workflow actions with this option." Salesforce makes you pick "created, and any time it's
Which Salesforce IDE Is Right for You?
“What tool do I need to write Apex and Visualforce code?” The answer used to be so simple! Once upon a time, Eclipse with the Force.com plugin (now collectively referred to as “the Force.com IDE”) was your only choice. Today, however, there are three major options: The Force.com IDE MavensMate with Sublime The Force.com Dev
5 Quick Tips to Write Great Code
At OpFocus, we often review code written by other developers. Sometimes these code reviews are planned: a client invites us in to review their code, either for training purposes or to address a specific problem. Other times, code reviews are a response to an unexpected emergency: for example, we try to deploy new functionality only to discover
Pros & Cons of Report Charts vs Visualforce Charts
In my previous post, I demonstrated some tricks in creating a stacked bar chart using Visualforce Charting which inspired me to write this post about Report Charts vs. Visualforce Charts on Pages. Report Charts on pages is the latest addition to the Page Layout customization, which came with the Winter'14 release of Salesforce.com. I think