Development questions

How do Platform Events and Change Data Capture (CDC) triggers differ from standard SObject triggers?

Standard SObject triggers fire synchronously on DML, support before and after events and all operations, run in the user's transaction.

Platform Event triggers (MyEvent__e) support only after insert, run asynchronously in a separate transaction as the Automated Process user, and fire when an event is published. They can be configured with a running user and checkpointed for retries.

CDC triggers (AccountChangeEvent) also support only after insert; they receive change events with a header (EntityName, ChangeType, RecordIds, ChangedFields) after the record is committed.

Both are asynchronous, decoupled, and cannot block the original save.

apex-triggertriggerplatform-eventscdc