• codek
  • NEWBIE
  • 0 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 1
    Replies

(Reposted here after suggested by someone on the answers board)

 

Hi,

We'd like to be able to specify that a batch of 200 from the api will fail completely, if any of the records fail, as this is the only way to ensure integrity when batch processing.

I see you can use this option from within Apex code, but it doesnt seem to be exposed at the API level, is that right?

Is there any other way of doing this, other than not batching?

(Basically we're loading 1000's of records, and recording the last successful max ID that we processed.  If some records in the middle of the batch fail, and others succeed, then we can't record a max ID , as it's meaningless - We also want to avoid recording an ID too low and causing duplicates to be inserted.)

Thanks,
Dan

  • April 01, 2010
  • Like
  • 0
Hi,

I've got a batch upload process working for multiple Leads, but now i need to attach Notes too.

From what I can see you must create the Lead first, then the note, with the notes parent id as that of the lead.

Ok; So that becomes tricky with batching.

Presumably what i'll have to do is:

Create the batch of up to 200 leads, saving the ID's
Loop through the 200 associated notes, setting the parent ID's
upload the notes

Actually it's not that complicated having now written it, but is it the right way to do it?

Many thanks!
Dan
  • December 03, 2008
  • Like
  • 0
I can login using the Getting Started java console example, but I'm not having luck with Tomcat. I created a servlet, but when login is called it keeps getting stuck on RemoteException, but ex.getMessage is always null, so it doesn't tell me what the problem is. I searched google and the message board for days, but I'm completely stuck. Any ideas? Anyone experience this before? Many thanks. ~Samantha

Background:
-- sforce API 4, XP Pro, Tomcat 5.0.18, Axis 1.1, Eclipse 3.0/MyEclipse, jdk 4.0.2.05
-- tried connecting to both: http(s)://www.salesforce.com/services/Soap/c/4.0/
-- Axis libraries were copied to Tomcat's /common/lib
-- tested both http://localhost:8080 & https://localhost:8443 (keytool generated cert was installed). Keep getting the same results. This is not the Handshake problem.

Code segment:

try{
loginResult = binding.login(userName,password);
}
catch(LoginFault ex){
out.println("

Login error: " + ex.getMessage() + "

");
return false;
}

///---PROGRAM DOESN'T GET PAST RemoteException.
///---ex.getMessage() IS ALWAYS NULL

catch(RemoteException ex){
out.println("

Login Remote Host error: " + ex.getMessage() + "

");
return false;
}
////---can't get this far
try{
binding = (SoapBindingStub)
new SforceServiceLocator().getSoap(new URL(loginResult.getServerUrl()));
}
catch(MalformedURLException ex){
out.println("An error: " + ex.getMessage());
return false;
}
catch(ServiceException jre){
out.println("An error: "+ jre.getMessage());
return false;

}