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
CloudResearchCloudResearch 

How to insert sObject dynamically using Java and Salesforce API?

I read the blog post "Inserting sObject Dynamically in Salesforce" (http://forceguru.blogspot.com/2011/08/inserting-sobject-dynamically-in.html), and the solution is implemented in Apex. Is it possible to do similar thing in Java application by using Salesforce remote API?

Best regards,
Darko

SuperfellSuperfell

Yes, you can do similar things via the partner SOAP API, or the REST API.

CloudResearchCloudResearch

How to do that (insert sObject dynamically)? API call describeGlobal() does not return sObjects, it returns only DescribeGlobalSObjectResult that gives some description about available objects. Furthermore, SObject in Java does not have put() method as  in Apex example http://forceguru.blogspot.com/2011/08/inserting-sobject-dynamically-in.html  nor other similar method.

 

Darko