Update
In Salesforce DML operations and automation, an operation that modifies existing records in the database, changing field values on one or more records of an object, executable through Apex, flows, or the API.
Definition
In Salesforce DML operations and automation, an operation that modifies existing records in the database, changing field values on one or more records of an object, executable through Apex, flows, or the API.
In plain English
“An Update in Salesforce DML is an operation that modifies existing records in the database, changing field values on one or more records. In automation, update actions change field values when criteria are met.”
Worked example
A developer at Dovetail Furniture writes an Apex trigger that runs on Order updates: when an Order's Status changes from Draft to Submitted, the trigger executes an Update DML statement against related Inventory_Item__c records to decrement available stock. The Update modifies the existing Inventory records' Available_Qty__c field - it doesn't insert new records and doesn't delete anything. Bulkified properly, the Update runs as a single DML call regardless of how many Order lines are involved. Without the Update DML, the inventory would never reflect submitted orders; with it, stock levels stay accurate to the second across the warehouse, the storefront, and the order book.
Why Update matters
In Salesforce DML operations and automation, an Update is an operation that modifies existing records in the database, changing field values on one or more records of an object. Updates can happen through user editing, Apex DML, Flow record updates, API calls, or batch processing.
Updates are one of the four CRUD operations (Create, Read, Update, Delete) and are subject to governor limits per transaction. Bulk updates (updating many records at once) require bulk-safe coding patterns in Apex. Trigger context provides Trigger.old and Trigger.new for comparing previous and new field values during updates.
How organizations use Update
Uses Flow for automated field updates when business criteria are met.
Writes bulk-safe Apex update code respecting governor limits.
Uses multiple update mechanisms based on context: UI, Flow, Apex, API.
Test your knowledge
Q1. What is an Update in Salesforce?
Q2. What mechanisms trigger updates?
Q3. What provides previous values in triggers?
Discussion
Loading discussion…