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
Rahul Kumar 242Rahul Kumar 242 

Upsert Operation for Multiple object(Parent & Child) in one call through API

I am trying to perform an Upsert Operation from SoapUI using enterprise WSDL. For a single object it is working fine. The actual problem is comming when i am trying to perform this operation on 2 different objects. Its giving me the error that only one sObject type is allowed. For Example let's say that i have an Account and a custom child object Payer. So now i want to perform an Upsert on both the object in a single API call. If any of you can provide me a SOAP call example for this scenario it will be of great help. 

Thanks in Advance!
VineetKumarVineetKumar
As per the documentation salesforce doesn't support this for an Upsert call.
You can process records for one more than object type in ancreate() or update() call, but all records must have the same object type in an upsert() call.
Said that, if possible split the upsert call into seperate update or insert calls, then you would be able to perform that on an list sObject(one or more object type).

Reference : https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_calls_upsert.htm

Let  me know if that helped.
Do mark my answer as best answer if that did.