Im working with ZKSForce library to upload data to CLOUD database.
In salesforce , there is an option to upload both parent and child table in single call.
salesforce – create
Does, this feature allowed in ZkSForce. How to pass the child object reference to parent table.
Yes, create in ZKSforce works exactly the same way as the underlying SOAP API, you pass in an array of ZKSObjects that you want to create.
As the docs you linked to mention if you want to create records that are related to each other, then the parent record(s) will need to have an external Id field declared for it, and your child records will need to use that to declare the parent, e.g. If you want to insert an account with a related contact, and have an accMaster__c field on account that is an externalId, you’d do.
After running this and opening the new contact record in the browser, you can see that it set the parent account relationship to be the new account record we just created.
If you don’t have a natural externalId field on your parent records, then one thing you can do is create one and use GUIDs from the client as the externalId value for your newly inserted records, this’ll let you related the records together in you create call without having to have some external system maintain the externalIds->salesforce mappings.