Skip to main content

New answers tagged

1 vote

Accessing relationship fields in fflib

Selectors are just a mockable reusable wrapper around SOQL that can be independently unit tested. A properly named selector like ContactsSelector.newInstance().selectWithAccountByEmail(emails) tells ...
cropredy's user avatar
  • 72.5k
1 vote

Accessing relationship fields in fflib

Yes, you can. First of all it is more about how your team prefer to handle such scenarios, but not about strict rules that everyone should follow. When I am choosing beetween different approaches I ...
Paul Kalinin's user avatar
1 vote
Accepted

About Design Pattern - Avoid excessive looping

tl;dr: Don't worry so much about performance until you know it's an issue (and can measure it). Just focus on making it easy to read and test, and keeping things like queries and DML outside of all ...
Derek F's user avatar
  • 63.2k
0 votes

About Design Pattern - Avoid excessive looping

A typical trigger framework (example) abstracts the trigger operation into three parts: bulkBefore(), action(record), and bulkAfter(). Note that this doesn't "save" any loops during ...
sfdcfox's user avatar
  • 500k
1 vote

Design patterns - benefits of using with Apex code

I have quite different views compared to the rest of the responses. Salesforce had a statement limit before the CPU limit came into the picture. Thus, it was extremely efficient to make things public ...
Pranay Jaiswal's user avatar

Top 50 recent answers are included