Rule documentation

Learn everything about our rules, and how to leverage them drive absolute quality in your development team.

Lorenzo Frattini avatar Gabriele Gallo Stampino avatar
47 articles in this collection
Written by Lorenzo Frattini and Gabriele Gallo Stampino
Coding best practices

Asynchronous methods in loops

Prevent the use of asynchronous Apex methods (@future) inside loops, to help your application cope with larger volumes of data properly.
Lorenzo Frattini avatar
Written by Lorenzo Frattini
Updated over a week ago

Boundaries on SOQL statements

Ensure all SOQL statements are either bound by either a LIMIT or by a WHERE clause.
Lorenzo Frattini avatar
Written by Lorenzo Frattini
Updated over a week ago

Bulkification of triggers

Ensure your Apex triggers can process data in bulks and properly deal with larger volumes.
Lorenzo Frattini avatar
Written by Lorenzo Frattini
Updated over a week ago

Business logic in triggers

Detect the presence of non-trivial business logic inside Apex triggers.
Lorenzo Frattini avatar
Written by Lorenzo Frattini
Updated over a week ago

Metadata API recency

Ensure your components are up to date with a recent enough version of the Salesforce API.
Lorenzo Frattini avatar
Written by Lorenzo Frattini
Updated over a week ago

Multiple triggers per object

Detect multiple triggers on the same object, and prevent non-deterministic behaviours.
Lorenzo Frattini avatar
Written by Lorenzo Frattini
Updated over a week ago

Nested IFs

Keep your code easy to read and test by containing the use of nested conditional structures.
Lorenzo Frattini avatar
Written by Lorenzo Frattini
Updated over a week ago

Number of arguments per method

Limit the number of arguments allowed for each method to keep your code easy to read and maintain.
Lorenzo Frattini avatar
Written by Lorenzo Frattini
Updated over a week ago

Number of methods per class

Limit the number of methods allow per each Apex class, to encourage good design.
Lorenzo Frattini avatar
Written by Lorenzo Frattini
Updated over a week ago

Send email in loops

Prevent uses of Messaging.sendEmail inside loops, to reduce the risk of running into governor limits.
Lorenzo Frattini avatar
Written by Lorenzo Frattini
Updated over a week ago