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
forceAMPforceAMP 

New error after maintenance this weekend: all SObjects in create or update must be of same type

We have several customers who are now getting the following error:

 

"all SObjects in create or update must of same type"

 

I am trying to run down the instances affected but the common element is that these Update and Insert api calls were working fine on Friday but now do not work on Monday.

 

We are busy collecting the SOAP data to file a case but wondered if anyone else if experiencing these issues as well.

 

Thanks,

 

Bill Emerson

VinodMVinodM

Which API version is this happenning for you? Is this Apex create/update or Salesforce API create/update?

forceAMPforceAMP

Salesforce.com API.  Looks like it is occuring in the sandbox instances that were upgraded this weekend.  Application is using the 19.0 endpoint,  not the 20.0 endpoint.

 

VinodMVinodM

Mixed create/update (for example, creating contact and account in the same API call) was not allowed till 19.0. It will be allowed from API version 20.0 onwards.

 

To confirm this, I just tried this on again na1.salesforce.com which has not been upgraded yet:

 

https://na1.salesforce.com/soap/ajax/19.0/debugshell.html

 

var c = new sforce.SObject("Contact");

c.lastname = "mytestcontact";

var a = new sforce.SObject("Account");

a.name = "mytestaccount";

sforce.connection.create([a, c]);

 

Error:

 

INVALID_TYPE: all sObjects in create or update must be of same type



Can you tell me what's different in your case? I am wondering how was it working for you before.

forceAMPforceAMP

It is not mixed.  They are all objects of the same type.

 

This is a regression error occuring against previous working 19.0 code.

 

Thanks,

 

Bill

VinodMVinodM

We have identified the problem. It is a bug. It is a casing issue. Example:

 

var a1 = new sforce.SObject("Account"); a1.name = "test1";
var a2 = new sforce.SObject("account"); a2.name = "test2";
sforce.connection.create([a1, a2]);

 

The above will fail with: "INVALID_TYPE: all sObjects in create or update must be of same type".

 

Workaround: don't use mixed case. We are working on a fix. Apologies for the breakage.

forceAMPforceAMP

I don't think it is the same bug because we are using the Enterprise WSDL where objects are explicitly typed with no difference in case.

 

We have multiple customers who have filed a case. Is there a way we can get notification when the fix is applied so that they/we can regression test to make sure it fixed our bug as well ?

VinodMVinodM

I will post on this thread as soon as the fix is in production. This bug should not show up with enterprise WSDL when casing doesn't come into picture. Can you please double check?

VinodMVinodM

The fix for this issue went out to the 168 production instances today. This issue should be resolved now.

VinodMVinodM

Correction:

 

The fix for this issue went out to the Winter'11 production instances today. This issue should be resolved now.