Because the original Salesforce Cookbooks are no longer available online, I’m putting this code here so other people can benefit from it. I’m pulling (and cleaning up a bit) from the 2010 Cookbook. Discover an effective solution for preventing duplicate leads in Salesforce with this comprehensive Apex code cookbook. Because the original Salesforce Cookbooks are […]
Duplicate Record Item Enrichment and Auto-Deletion Code
TL;DR: Check out code to enrich DuplicateRecordItem records and to handle extra DuplicateRecordSet records after merging duplicates at https://github.com/dschach/duplicatehandling I love the standard Salesforce duplicate records feature (Trailhead: https://trailhead.salesforce.com/content/learn/modules/sales_admin_duplicate_management H&T: https://help.salesforce.com/s/articleView?id=sf.managing_duplicates_overview.htm) and have used it extensively, both to prevent duplicates and to track/report on duplicates for later management. If your org is set to allow […]
Lightning Component With Running User Information
Chatter Publisher Actions (Part 2): Object Custom Action
In the previous post, we looked at using the standard (button-click) way to create a new child record using Publisher Actions. Pretty basic stuff. Using Visualforce to create a custom action is a bit harder. Let's start with the documentation. The PDF provided by clicking on the link in the Actions screen (Account action is […]
Create and Populate a Map Without Loops
Workflow ISCHANGED() translated to Apex trigger
Workflow is great. I can simply and declaratively make changes, and can easily update things like email templates, criteria, tasks, etc. without using Eclipse and writing/running unit tests.Sometimes, however, workflow isn’t enough; we need to use a trigger. Today, I had a use-case that when a DateTime field is filled, a contact (identified via a […]
PageReference Best Practice
Chatter BINGO Released Into The Wild
With Dreamforce 2010 behind us and Dreamforce 2011 fast approaching, the first ever crowdsourced conference application is publicly available! Chatter BINGO has been released as an unmanaged package, meaning that all the source code is open and ready for customizing to your hearts’ content. Chatter BINGO was conceived by Chris Shackelford and Brad Gross (@imperialstout) […]