Transaction Control in Apex: Savepoints, Rollbacks, and Retry Logic Explained

In Salesforce, every transaction (trigger, batch execution, future job, etc.) is like an all-or-nothing deal. If something fails, the whole…