2011 Salesforce Cookbook Holiday Recipe Contest Winner

In 2011, my soon to be wife, Amanda, wanted a new Apple computer. Her 2002 desktop still worked but was becoming slow and new software would not run on it because of its old pre-Intel chipset. Apple devices are great but you pay a hefty premium to purchase them.

While discussing the matter with a colleague one day, he mentioned I should enter the Salesforce Cookbook Recipe Contest. First place: a new MacBook Air.

Salesforce Cookbooks are short articles that describe how to accomplish various Force.com platform functionality. The contest was open during December 2011. One could submit multiple recipes. Over the holidays, the Calling Salesforce Web Services Using Apex, one of the most popular recipes 5 years later, and Automated Unit Test Execution recipes were submitted. On a Friday in January, Salesforce told me that I had won with my Automated Unit Test Execution recipe. Three days later, the laptop was Amandas and Salesforce announced the winner.

Amanda has used it daily every since. Share knowledge and the wife gets a MacBook Air. Win-Win.

What do you think of the recipes? Do you have any favorites?


Salesforce Javascript Buttons

Javascript buttons are buttons that are shown on a record that execute the configured Javascript when clicked. In this post, I’ll cover benefits and drawbacks. For how to configure one, see Create a Custom Button in Salesforce and other resources.


  • Fast Development. Enter the javascript to run, click the button, verify functionality, repeat until working as designed.
  • Can execute web services. One can create a Salesforce web service in Apex that can then be invoked from a record. This is useful for doing various processing on a record. For example, the candidate has been approved and now you want to update the status and email the individual in one button click.


  • UX Experience calling web services. If the web service does a moderate level of processing, the user may have to wait seconds for the operation to complete. Salesforce doesn’t automatically update the UI to indicate that something is happening. It’s up to the developer to update the UI to reflect the processing is in-progress and to notify the user with a message of the operation’s success or failure.
  • Have to add dependent libraries like JQuery through RequireScript syntax or other means. Open jQuery Dialog from Custom Button for more info.
  • Cross-Browser Compatibility.  While ubiquitous  across browsers, Javascript feature support still varies so ensure that your code works in the Salesforce supported browsers like Chrome, Firefox, and Edge. ECMAScript 6 Compatibility has a nice matrix showing the capabilities of browsers as of April 2016.

Overall, Javascript buttons are sweet. They are good for light to moderately complex operations. For more complex ones, use a Visualforce or Lightning page to handle it.

What do you think of Javascript buttons? What other benefits and drawback would you consider? Also, how often do you use them?

Happy Coding,


Salesforce Bulk API Starter Nuget Installation Issue

danieleboldrini reported the following issue when trying to install the SFBulkAPIStarter Nuget package in VisualStudio 2015. Full Issue Details

Could not install package ‘SFBulkAPIStarter 0.12.0’. You are trying to install this package into a project that targets

‘.NETFramework,Version=v4.5.2’, but the package does not contain any assembly references or content files that are compatible with that framework.

With VisualStudio 2015 Community, I was able to reproduce the issue in a new console application. Doing the same in VisualStudio 2013 Community installed fine. Very weird.

After digging around a bit, Microsoft changed how they treat Nuget package lib contents in VisualStudio 2015. In version 0.12, all the DLLs were under the lib folder because they weren’t targeting any specific version of the .NET runtime since there wasn’t a specific version dependency.

To appease the VisualStudio 2015 gods, the DLLs were put under the net45 folder in the Libs folder and released in version 0.13 on Nuget.

What Nuget packaging issues have you encountered? Is there a better way to handle this?


Salesforce Summer 16 Releases Notes Review

It’s that time of year again with Salesforce releasing their Summer 16 release notes describing all the changes in the Summer 16 release. Salesforce periodically publishes new documentation or makes significant updates to existing documentation. To receive these notices from Salesforce, follow @salesforcedocs on Twitter.

Here’s my review of the release notes. Let me know what you think of the release in the comments.

Unlimited Apps and Tabs

In professional, Enterprise and Unlimited editions, Salesforce now allows an unlimited number of apps and tabs. An app in this context is a collection of tabs. It’s not an app from the AppExchange and it’s not a connected app.

The unlimited tabs is especially useful because in the past, some clients had to purchase additional Force.com One App licenses so they could get up to an additional 90 tabs. This usually took a while to provision and delayed development a bit.

Associate A Contact With Multiple Accounts

“Contacts to Multiple Accounts lets your sales reps easily manage the relationships between people and businesses without creating duplicate records. This feature is available in Lightning Experience,
Salesforce Classic, and all versions of the Salesforce1 mobile app.”

This is a really nice enhancement and a welcome addition to the Salescloud. Now, one contact can be tied to multiple accounts reducing the duplication of records. It also allows one to describe an individual’s relationships with a company over time. For example, it could show that Luke worked at Company A as a Software Engineer from Year 1 – Year 3 and then have another record to Company A showing that Luke is now a Senior Technical Consultant from Year 4 – 5. Similarly, it could show that Luke worked at Company A from Year 1-3 and then at Company B from Year 4 – 7.

Lightning Changes

If you’ve been living under a rock, Lightning is Salesforce’s new responsive UI. It’s been around for a few releases now and its adoption has been fairly slow because it doesn’t have all the features that “Salesforce Classic” has. Below are new lightning features that will change that.

Home: Customize Home for Different User Profiles

An admin can now change home pages for different users based on their profiles.

“Display and organize useful components, and assign different pages to different types of users. You can even create and edit pages for leads, contacts, and other types of records! This feature is available in Lightning Experience only.”

Lightning Filter List Views Now Supported

One can now create filters on their Lightning list views. List views are one of my favorite Salesforce features. It lets a user define different views into viewing their data. For example, show me the top closed opportunities or highest probability opportunities.

“Lightning Experience filtering capabilities are now on par with the sleek efficiency of the user interface. With the addition of filter logic, your reps can pinpoint the data they need while enjoying an intuitive user experience. Reps can see available filters without editing alist view, and edit filters on the fly. This feature is available in both Lightning Experience and Salesforce Classic.
Filter logic in Lightning Experience works just like in Salesforce Classic. Add filter logic from the Filters panel.”


Email: Enhanced Email, Send Email Through External Accounts

“Enhanced Email promotes email to a standard object, so your users can view emails in a standard
interface. Users can now relate emails to their contact, lead, account, opportunity, case, campaign,
and person account records. Does your company primarily send email using Gmail or Office 365?
Enable Send through Gmail or Send through Office 365 and let users opt in by connecting their
own accounts. Enjoy!”

This lets a Salesforce user to send email from their personal Gmail or Outlook 365 account from Salesforce. Unfortunately, emails sent through workflows and triggers are still sent through Salesforce so that puts a big damper on system notifications with this feature.

Automatically Get Geocodes for Addresses (Generally Available)

Salesforce will now automatically determine an addresses geocode coordinates for the Billing and Shipping address on accounts, the Mailing Address on contacts and Address on leads. This allows one to find nearby companies and individuals and do other interesting functions like creating a map showing customer density in a given territory like the northeast.

This feature is not available for Person Accounts and is not supported on custom objects or other standard objects.

Process Builder: Processes Can Execute Actions on More Than One Criteria

“Now you can choose what happens after your process executes a specific action group. Should the process stop, or should it continue evaluating the next criteria in the process? It’s up to you! Best of all, executing multiple action groups in a single process makes it easy to manage all of your processes for a given object, like a Case, in one place.”

Deployment: Sandbox Cloning and More Included Sandboxes

One can now create a sandbox by cloning it from an existing sandbox instead of having to refresh it from production.

“To clone a sandbox, from Setup, enter Sandboxes in the Quick Find box, then select Sandboxes > New Sandbox. From the
Create From drop-down menu, select the name of the sandbox to clone.”

This allows iterative development to be easier by copying over “a previously set of chosen metadata and data”. One case it’s easier is perhaps feature A is developed in Sandbox 1 and is in code review or internal QA but feature B is dependent on that work. Now, Sandbox 2 can be cloned from Sandbox 1 and feature B work can begin.

I’m curious if Salesforce will charge extra for this feature and what the limitations are for cloning. Extra Full and Partial sandboxes are not cheap and managing the “data” has always been a challenge, especially with determining a subset of data to import into Developer sandboxes.

Other Changes

The development changes this release are “nice-to-haves” that aren’t wowing me. For example, debug logs are now easier to manage, Asynchronous limits have been combined into one, View Apex Test Results More Easily, and one can now Get a Map of Populated SObject Fields.

As a developer, I want to see more “modern” enhancements to Apex like lambdas like LINQ in C# and more metadata programming enhancements. Salesforce added the “Type” class where one can dynamically instantiate classes based on name but I want more type information so that I can do things like give me all classes that extend class A or implement interface B.

For the full list of changes, see the Summer 16 Release Notes.