🔧 Build it · 60 XP
Record-triggered Flows
Record-triggered Flows
Flow is Salesforce's visual automation tool, and the record-triggered flow is its answer to Apex triggers: it runs when a record is created, updated or deleted.
Before-save vs after-save
| Optimize for | Runs | Good for | Speed |
|---|---|---|---|
| Fast Field Updates (before-save) | Before the record is saved | Setting fields on the triggering record | ⚡ Very fast, no extra DML |
| Actions and Related Records (after-save) | After the save | Creating/updating other records, sending emails, callouts | Slower |
Sound familiar? It's the same idea as before and after Apex triggers, which you'll meet later.
Your mission
Build a record-triggered flow on Quest__c that sets Status to New when a quest is created without a status.
- Setup → Flows → New Flow → Record-Triggered Flow
- Object: Quest, trigger: A record is created
- Entry condition: Status__c Is Null True
- Optimize for Fast Field Updates
- Add an Update Triggering Record element:
Status__c=New - Save it as Quest Default Status, API name
Quest_Default_Status, then click Activate
When you Submit, Quill inserts quests with and without a status and checks what your flow did.
🦝 Don't forget to Activate. Quill has watched grown developers debug an inactive flow for an hour.