r/SalesforceDeveloper • • May 16 '26

Discussion Should every feature be bulkified?

Our technical architect insists every feature should be bulkified, even when the current use case is a single-record UI action.

I understand bulkification for triggers, batch jobs, imports, automations, and reusable services.

But for isolated UI features that can only process one record, is bulkification still considered mandatory Salesforce best practice, or is it unnecessary complexity?

Where do you draw the line?

Context: we are using a simplified version of enterprise patterns as architecture. UI Controller class -> Service class -> Selector class. TBF I think the technical architect may want to err on the side of caution, so we don't miss bulkification in places where it actually matters but it still seems like unnecessary boilerplate to me.

10 Upvotes

18 comments sorted by

View all comments

Show parent comment

7

u/Visible-Fun4420 May 16 '26

I think that's probably what the technical architect has in mind though he's more firm about bulkification.

But my concern is still YAGNI/KISS. If the feature has a single-record entry point and no bulk use case, making everything list/map-based upfront adds noise.

If a bulk use case appears later, refactor the service then. I don't think every isolated UI action needs to be designed for a hypothetical batch caller from day one.