You need to sign in to do that
Don't have an account?
MAvdi
Upsert multiple values from Flex
Hi
I need to upsert an array of objects to salesforce database from flex. here is the code im trying to do it with
and here is the Debug Message I get
It seems that the API diesnt accept my array as a SOject or maybe has a problem with array of SObjects
Has anyone esle faced this problem before?
When i replay newItems with newItem in upsert it works fine...
I need to upsert an array of objects to salesforce database from flex. here is the code im trying to do it with
Code:
var newItems:Array= new Array();
for(var i:int=0;i<PDetails.authorFeeder.items.length;i++){
//newItem=null;
newItem=new SObject("R_Author__c");
newItem.PID__c=PID.PIDText;
newItem.Author__c=PDetails.authorFeeder.items[i];
newItems.push(newItem);
}
apex.upsert("Name",[newItems], new AsyncResponder( function ():void{
Alert.show("ok seems like authors are saved");
}));
and here is the Debug Message I get
Code:
[DEBUG] com.salesforce.Util Saleforce Soap Fault: sf:INVALID_TYPE INVALID_TYPE: sObject type 'sObject' is not supported. If you are attempting to use a custom object, be sure to append the '__c' after the entity name. Please reference your WSDL or the describe call for the appropriate names. 5/15/2008 17:18:03.569 [ERROR] com.salesforce.AsyncResponder (com.salesforce.results::Fault)#0 context = (null) detail = (Object)#1 InvalidSObjectFault = (Object)#2 column = -1 exceptionCode = "INVALID_TYPE" exceptionMessage = "sObject type 'sObject' is not supported. If you are attempting to use a custom object, be sure to append the '__c' after the entity name. Please reference your WSDL or the describe call for the appropriate names." row = -1 xsi:type = "sf:InvalidSObjectFault" faultcode = "sf:INVALID_TYPE" faultstring = "INVALID_TYPE: sObject type 'sObject' is not supported. If you are attempting to use a custom object, be sure to append the '__c' after the entity name. Please reference your WSDL or the describe call for the appropriate names."
It seems that the API diesnt accept my array as a SOject or maybe has a problem with array of SObjects
Has anyone esle faced this problem before?
When i replay newItems with newItem in upsert it works fine...
All Answers