Tuesday, June 3, 2014

Tip: How to Fire an Updated Trigger on Existing Salesforce Records

Hey Salesforce Admins,

Here's a tip to help you if you've got a recently updated or newly created trigger (or workflow rule) that you want to fire on existing records.

Create a custom 'Admin Filter' text field on the object that you are running the trigger on. You don't need to add it to any page layouts or make it visible to users. (I chose this method because I didn't want to update any existing fields that are already in use in order to force the trigger to fire.)

Then, use the Data Loader (or Mass Update Anything) to update that field on all of your records.

Ta-da! The update will fire the trigger on all records that match whatever criteria you've specified.

Now, I'm off to do this in my own org.