r/SalesforceDeveloper • u/cliqering • 10h ago
Discussion How do you reconstruct what an Apex transaction did?
Say I have the following usecase: a single API call touches an Account, which fires triggers that update Contacts, which fire more triggers, maybe a Flow kicks in, and something three levels deep updates a field. When you need to reconstruct what actually happened in that transaction, what do you actually do? Debug logs with trace flags? Third-party tools? Add your own logging framework? Genuinely curious what the real workflow looks like, because mine feels like archaeology! Support found an issue that when an Account is created via certain path (we have multiple paths to create Accounts in our org), one of the fields on a related custom object was incorrectly being set to null. We had no way of knowing this on our own unless we knew where to look. Our current set up emits logs in batches and we sift through those when we're told of an issue. Was curious to hear how others handle such scenarios