We are using Salesforce.com adapter to transfer data to Salesforce.com CRM. We have a requirement to insert data into Detail tables only if insertion into Header table succeeds. So we are using startTransaction, commitTransaction & rollbackTransaction to control the transactions. But it is failing to rollback the data being inserted into Salesforce.
Below is the sample code showing insertion and throwing error after insertion to test rollback. But it is not working and failing to rollback the data being inserted into Salesforce.
insertAccount -> Inserts account data into Account sObject in
throwError -> Throws an exception to test whether rollback is working
Can you please let me know how to do Transaction management using Salesforce.com Adapter and let me know if you have any questions on the same.
Pradeep Kumar K