Simple Before-Save Flow

Here’s a real quick intro to the Spring ’20 Before-Save Flow feature. Find in depth information on this topic from Jennifer Lee and Jodie Miners.

Basic gist: 

  1. Double click into the Start element and indicate to launch Flow on new record created (in this example).
  2. Use a Decision element to see if this record meets criteria.
  3. If so, use an Assignment element to update the field values. There is no “update records” – you just use an Assignment.
  4. Access the values of the Record by using $Record.Field__c when choosing a resource or variable.
  5. You cannot access $Record.Id because it doesn’t have an ID yet! It hasn’t been saved.

Example Scenario: A new contact has been created. Before it’s saved, look to see if the email address of the contact indicates that this is one of our competitors, and if so mark them Email Opt Out.

Why do this: Technically, a before-save flow happens so much faster than waiting until the record is saved, launching a process, and then editing the record again. That’s two DML statements reduced to one (aka you only hit “save” in the database one time instead of two and this is a good thing). As far as a business use case, why not make your competitors work a little harder to access your content? But what do I know? I work with nonprofits.

This slideshow requires JavaScript.

Published by

JessieRymph

Jessie joined Salesforce.org in 2018 to give introductory webinars to nonprofit customers. She now is a Senior Solution Developer supporting nonprofits and education customers at Salesforce. All opinions expressed on this blog are her own or those of the contributors. She's spent 17 years more or less in CRMs and databases, but didn't meet Salesforce until 2011. Jessie co-led the Seattle Salesforce Nonprofit User Group in 2015-2016. She wrote a sh*tty first draft of a novel and hopes to turn it into a screenplay!

Leave a Reply