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
Steve McConnellSteve McConnell 

Summer '14 update (API 31) breaks Async metadata calls for older APIs

We first create a new object GTABLE_SM2__c via the asynchronous create() metadata call.   Then we attempt to add multiple fields to this object via another create() call.

Prior to the Summer '14 update for the organization's server, this was performed without issue.   Following the Summer '14 update, this create() call fails if the number of fields is greater than 6.  The SOAP fault is "UNKNOWN_EXCEPTION: Async job could not be executed".

If the create() is performed for 6 or fewer fields on this object, then it succeeds.

This behavior has been observed for both API 29 and API 30 endpoints.

We observed this across multiple Salesforce servers, and noticed that as Summer '14 was rolled out to a server, the behavior of its organizations began showing this problem.


Sample SOAP log of the create() data for 7 fields (header trimmed):

<soap:Body>
    <create xmlns="http://soap.sforce.com/2006/04/metadata">
        <metadata xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CustomField">
            <fullName>GTABLE_SM2__c.COLA__c</fullName>
            <label>COLA</label>
            <precision>18</precision>
            <scale>0</scale>
            <type>Number</type>
        </metadata>
        <metadata xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CustomField">
            <fullName>GTABLE_SM2__c.COLB__c</fullName>
            <label>COLB</label>
            <length>80</length>
            <type>Text</type>
        </metadata>
        <metadata xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CustomField">
            <fullName>GTABLE_SM2__c.COLC__c</fullName>
            <defaultValue>false</defaultValue>
            <label>COLC</label>
            <type>Checkbox</type>
        </metadata>
        <metadata xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CustomField">
            <fullName>GTABLE_SM2__c.COLD__c</fullName>
            <label>COLD</label>
            <type>Date</type>
        </metadata>
        <metadata xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CustomField">
            <fullName>GTABLE_SM2__c.COLE__c</fullName>
            <label>COLE</label>
            <length>5</length>
            <type>Text</type>
        </metadata>
        <metadata xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CustomField">
            <fullName>GTABLE_SM2__c.COLF__c</fullName>
            <label>COLF</label>
            <precision>18</precision>
            <scale>9</scale>
            <type>Number</type>
        </metadata>
        <metadata xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CustomField">
            <fullName>GTABLE_SM2__c.COLG__c</fullName>
            <defaultValue>false</defaultValue>
            <label>COLG</label>
            <type>Checkbox</type>
        </metadata>
    </create>
</soap:Body>



The full response message:

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sf="http://soap.sforce.com/2006/04/metadata">
    <soapenv:Body>
        <soapenv:Fault>
            <faultcode>sf:UNKNOWN_EXCEPTION</faultcode>
            <faultstring>UNKNOWN_EXCEPTION: Async job could not be executed</faultstring>
        </soapenv:Fault>
    </soapenv:Body>
</soapenv:Envelope>

Daniel LauDaniel Lau
I'm having the same problem when I'm trying to create objects and fields using a java application using the soap API. Please let me know if you've found a solution.
Steve McConnellSteve McConnell
Our approach for avoiding the problem is to no longer use the async behavior of older API versions.  We instead moved fully to API 31 and use the new synchronous calls (introduced in API 30 and 31) for our metadata CRUD operations.

I'm not aware of any actual solution that would allow the async metadata calls of the older API versions to function correctly yet.
docbilldocbill
Same problem doing deletes.   We've been having problems getting the newer version of the API's WSDL java generated classes to compile.  There is a problem with duplicate object definitions.   So I haven't been able to see if migrating to API version 31 would at least workaround the issue.