Skip to main content

Salesforce Flows

Explore practical guides and implementation patterns for this topic.

Posts

Salesforce Basics

The Ultimate Guide to Salesforce Flows: Before-Save vs. After-Save (10x Faster Updates)

💬 In plain words: Before-save updates in Salesforce are entirely free from a performance standpoint. Because the record is already open in memory, you are simply writing on it before it gets saved. After-save updates, however, force the system to re-open the record and run the entire save process all over again, essentially doubling your resource cost. The golden rule is simple: if you are changing the exact same record that triggered the flow, do it before the save. If you are updating related records, do it after the save. The Core Concept: Memory vs. Database A before-save flow modifies a record while it is still in the system's memory, right before it is permanently written to the database. No extra operations: It doesn't require an additional DML (Data Manipulation Language) statement, meaning no second save cycle. Lightning fast: Because triggers don't re-fire, Salesforce states that before-save updates are roughl...
Read article
Topic Apex Triggers Architecture Backend Development Order of Execution Salesforce Salesforce Flows
Apex Triggers Architecture Backend Development Order of Execution Salesforce Salesforce Flows

The Salesforce Order of Execution Explained (Modern Guide)

In plain words: The Salesforce Order of Execution is the strict, step-by-step checklist the platform follows every time a record is saved. It dictates exactly when system rules, Flows, Triggers, and automations fire. Knowing this order is the secret to preventing data from being overwritten unexpectedly and avoiding endless automation loops. Salesforce is a massive engine handling millions of operations per second. When a user clicks "Save" on a record, the platform doesn't just instantly dump that data into the database. Instead, it runs through a highly orchestrated sequence of events. If you don't understand this timeline, you might find your Custom Validation Rules being bypassed, or your Apex Triggers firing multiple times. Let's simplify the modern Salesforce Order of Execution. 1. Initialization & System Validation The moment a record is submitted, Salesforce loads the original record from the database (if it's an updat...
Read article