Let's say I call out to an external service, get some results, use them in a transaction which then crashes. As a result, the transaction is rolled back. The same effect can be achieved with save points and an explicit rollback.

Since Salesforce had the result of a synchronous callout, the callout did go to an external service. Also, since Salesforce does not control external services, any work done on external systems is not rolled back.

Am I correct in my understanding?


Yes. Your understanding is correct. You need to send external system a request to rollback. Otherwise it will be out of sync.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.