Skip to main content
New tool CRON Expression Builder — preview next run times before you schedule Apex. Open the builder →

DML articles

12 articles · Insert, update, upsert and delete behaviour, including partial success.

Diagram illustrating how an Apex Trigger executes during a mixed record upsert operation in SalesforceApex

Apex Trigger Upsert - How Many Times Does It Execute?

Your automation runs twice during an upsert because Salesforce splits the records into two buckets before the trigger...

· 4 min read
Diagram illustrating Apex security best practices for Salesforce development and secure coding.Apex

Apex Security Best Practices for Salesforce Developers

Security shouldn't be an afterthought, or something you bolt on the week before a release. Here is how I use User Mode...

· 5 min read
Diagram illustrating the process of optimizing Salesforce Flow logic for efficient bulk record processing.Flow

Salesforce Flow bulkification: How to handle bulk records

If your Flows crash during data imports, you probably have a bulkification problem. Here is how to move your logic out...

· 5 min read
Diagram illustrating the usage of the Salesforce Assignment Element within a complex Flow designFlow

Salesforce Assignment Element: Guide to Efficient Flows

Ever wonder why your Flows hit governor limits? Usually it is because you are not using the Salesforce Assignment...

· 4 min read
Diagram illustrating how the Salesforce merge trigger fires multiple times during a record merge operation.Apex

Salesforce merge trigger - How many times does it fire?

Ever wonder why your code runs three times during a single merge? Salesforce has no specific merge context, so it uses...

· 4 min read
A visual guide illustrating essential Salesforce Flow Elements building blocks for automation developers.Flow

Master Salesforce Flow Elements: Key Examples and Use Cases

Flow elements are the building blocks of your automation, and the wrong one in the wrong place turns a flow into a...

· 4 min read
Diagram illustrating Salesforce Flow transactions and rollback process boundaries for developersFlow

How to manage Salesforce Flow transactions and rollbacks

Ever had a flow crash and roll back changes you actually wanted to keep? That comes down to where the transaction...

· 4 min read
Salesforce Flow diagram illustrating how to fix roll-up summary field update failures across objectsAdmin

Fix your roll-up summary formula field cross-object issues

Ever wondered why your roll-up summary doesn't update when a grandparent record changes? Cross-object formulas do not...

· 4 min read
Diagram illustrating the step-by-step sequence of the Salesforce Order of Execution process for developersApex

Salesforce Order of Execution Guide for Apex Developers

Ever wonder why your record data looks different than expected after a save? It is usually the Salesforce Order of...

· 5 min read
Diagram illustrating the execution sequence of a Salesforce upsert trigger for bulk data loading.Apex

Salesforce Upsert Trigger - How Many Times Does It Fire?

Does an upsert fire both the insert and the update trigger at the same time? It is a common interview question that...

· 4 min read
Diagram illustrating the execution order of before vs after triggers in Salesforce Apex processing.Apex

Choosing before vs after triggers in Salesforce Apex

Choosing the wrong trigger timing can lead to messy code and governor limit issues. Here is when to use before vs after...

· 5 min read
Diagram illustrating the cause and solution for the common Salesforce Mixed DML errorApex

Salesforce Mixed DML - Causes and Solutions for Developers

Ever had your code crash because you tried to update a User and an Account at the same time? That's the Salesforce...

· 5 min read