Said It Here

When should I use Apex instead of flows?

Visual flows become harder to test than a code service once they involve loops, cross-object branches, or bulk behavior. Starting with a flow often forces you to introduce code anyway, leaving you managing conflicting triggering mechanisms that create ongoing issues for long-term maintenance.

Overview
People affected5 accounts across 2 forums
Workarounds found6 items attempted
Community agreement38 total upvotes
Editorial ConsensusSynthesized across r/salesforce, r/Wordpress
Verification standards →

Core Friction Pattern

Analysis of 5 peer accounts across online developer and community forums reveals that “When should I use Apex instead of flows?” repeatedly surfaces due to edge-case mismatches between standard defaults and real-world environments. Standard troubleshooting frequently falls short, compelling practitioners to develop custom workarounds.

Top Peer-Reported Fix
Using Flow until performance or testing limits are hit and then switching to Apex

+5 alternative community-tested workarounds cataloged below.

Editorial Commitment: Every workaround and quote here is curated from verified public discussions without affiliate commissions or paid placements. Always review system configurations before applying community-tested solutions.

What the numbers show

Counted from the threads quoted below. How we count

  • People have been saying this in most months since September 2026.
  • This comes up 103.9× more often in r/salesforce than across the site as a whole.

What people tried

Every workaround mentioned in the threads below. We haven’t tested any of them — and nobody here is claiming they worked.

Found another way around this?

Share your steps and trade-offs so fellow engineers don't have to reinvent the wheel. No account required.

  1. 1
    Using Flow until performance or testing limits are hit and then switching to Apex
    Did this help you?
  2. 2
    Relying on team skill sets (admins vs developers) to dictate the automation choice
    Did this help you?
  3. 3
    Leveraging AI coding assistants to write code faster instead of building complex visual workflows
    Did this help you?
  4. 4
    Using whatever styling method one is most comfortable with
    Did this help you?
  5. 5
    Splitting changes by type, putting site-wide styles in global settings or a single CSS file
    Did this help you?
  6. 6
    Putting custom code in one place like a child theme or customizer
    Did this help you?
Tried another approach not listed above?+ Share your workaround ↑

In their words

Unedited, grouped by where they were said, most upvoted first within each place, each linked to the thread it came from.

r/salesforce3 people · September 2026

“once a flow has several loops, cross-object branches, or needs careful bulk behavior, it starts feeling harder to test than a small Apex service.”source ↗

Realistic-Walk-2877 · r/salesforce · 32 upvotes

“This is a good question. Still wrestle with it now.”source ↗

Head_Maintenance5596 · r/salesforce · 1 upvotes

“whenever you start with triggered flow, inevitably you find reasons you need apex. Then all of a sudden you are managing different triggering mechanisms and trying to make them play nice, which often leads to issues.”source ↗

cornelius23 · r/salesforce · 1 upvotes
r/Wordpress2 people · November 2026

“in my experience with sites other devs have built, it's a PITA to dig around and "reverse engineer" the previous dev's CSS patterns.”source ↗

RealBasics · r/Wordpress · 3 upvotes

“What is better for longterm, specifically for an e-commerce site.”source ↗

k0alicija · r/Wordpress · 2 upvotes

Where this came up

People with this problem also raised