You need to sign in to do that
Don't have an account?
bs2
SObject Error When passing Custom Objects
I have an custom apex class with 2 webservice method defined as follows( i had to define these custom methods as i need to be able to provide cleint with capability of allowing partial success or not for batch inserts)
Webservice static void createCustomObject(sObject[] objectsToInsert,boolean trueOrFalse) {
Database.Insert(objectsToInsert,trueOrFalse);
Database.Insert(objectsToInsert,trueOrFalse);
}
Webservice static void createCustomObject(CustomObject[] objectsToInsert,boolean trueOrFalse) {
Database.Insert(objectsToInsert,trueOrFalse);
Database.Insert(objectsToInsert,trueOrFalse);
}
I generated the WSDL and my generated custom objects extend the generated SObject. From the java client class I call both methods and first one fails while second one is OK. Why is this happening? I need to be able to use the first one as I can pass in any custom object and reuse same method.
Any suggestions will be greately appreciated. Thx a lot