function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
rsonirsoni 

Transaction Capibilies

Hi,
Can any one help me out on following issue.

What are the transaction capibilities provided by sales force api.
Eg if I am trying to upload 100 records into sales force using sales force api and the sales force goes down in between.How does sales force api takes care of transactions.

regards

Message Edited by rsoni on 12-18-2005 08:04 PM

Message Edited by rsoni on 12-18-2005 08:04 PM

benjasikbenjasik
There are a number of possible bad things that can happen. Your internet connection could go down as well after we commit the transaction and try to send the response. You really need to get the SaveResult to know what happened

Your best bet is to have exception handling code such that if you don't received the SaveResult, you retry your call. For update calls, you should be ok making the call more than once and not having adverse side effects. For create calls, your exception handling needs to be a bit more involved. Assuming you have a unique ID you are inserting, you can query for those values if you get a network exception, and look to see if any were actually inserted. With the upcoming winter release, you could use the upsert call, and just make the call again, and not have to worry about duplicates.
edsenaedsena

benjasik wrote:
With the upcoming winter release, you could use the upsert call, and just make the call again, and not have to worry about duplicates.



Hi Benji,

As long as the winter version is already released, is this "upsert call" available ? I couldn't find any reference of it on Salesforce API online documentation...

Best Regards,
Ed.
SuperfellSuperfell
Yes, upsert is available in the 7.0 api

http://www.sforce.com/us/docs/sforce70/sforce_API_calls_upsert.html#wp3095037