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
svidyansvidyan 

File Metadata API

Hi,

 

I am trying to create new Custom objects via File based Metadata API in java.

If  I specify more that ONE object in the package.xml, it comes with the exception "UnExpected Error".

 

But if I do one at a time, the custom objects are being created.

Am I missing any configuration for bulk creation of objects thru Metadata API?

 

Sample package.xml is below:

 

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types>
        <members>Facility_Address__c</members>
        <name>CustomObject</name>
    </types>
    <version>20.0</version>
</Package>

 

thanks

svidyan

jhurstjhurst

Svidyan,

 

I just tested this out (using the IDE and not Java) and was able to create multiple objects.  

 

The best course of action to help track this down will be to:

 

1. Work with salesforce.com support to capture the API SOAP call that is being sent to salesforce.com

2. Compare that with the equivalent call from the IDE

 

You can then track down where exactly the error is happening.

 

Could you please log a case and then reply to this thread with the case number?  I will then get it assigned to one of our reps to help you out.

 

Thanks

Jay