What are the possible way by which external system can insert/update multiple records in salesforce without writing any apex webservice. If webservice is required how it can be implemented. Please provide a sample code.


See the treesave API pilot:

It lets you save records in hierarchy via the rest API. https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/resources_composite_sobject_tree.htm


Salesforce has a native SOAP API and REST API that allows inserting and updating multiple records. The documentation for both APIs include "Quick Start" sections with sample code that should get you going.

  • Thanks Marty C. I want external system should be able to insert/update a parent and related child record in a single request to Salesforce. Will that be possible using these APIs? – Harshal Dhage Feb 19 '16 at 3:48
  • You'll need to make two calls, one to insert/update the parent, and then a second call to insert/update the children. – Marty C. Feb 19 '16 at 3:55
  • Is it possible to do this without writing any apex web service in Salesforce. If I provide partner wsdl to client, will they be able to insert/update records in Salesforce. – Harshal Dhage Feb 19 '16 at 3:57
  • Yes. If you use the SOAP API and use the WSDL, and you have software or middleware that can configure itself using the WSDL you won't have to write any code. You don't have to write an Apex web service. – Marty C. Feb 19 '16 at 4:14
  • Note that the REST API does not allow you to insert multiple records, as far as I'm aware. – Willem Mulder Feb 22 '18 at 13:17

One of the things that's been omitted from the other responses to this question is that multi-record updates typically involve the use of some kind of wrapper class. So, even if someone has your WSDL, unless their service will work with the standard Apex Web Services classes (using your WSDL), any kind of custom service will involve either some kind of "middleware" on their end or creating a class that can process (or "accumulate") the inbound call into a list that Apex can parse/handle via what's essentially a wrapper class. That's the essence of how outbound multiple records are sent, so code that's essentially the equivalent needs to be configured to handle the records as they arrive on this end.

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.