You need to sign in to do that
Don't have an account?
ch9dev
Exception while Creating multiple SObjects
I am using php 5.12 and the newest PHP5 Toolkit 1.0.3
I am sending the following array of SObjects to a custom Table in sales force.
Code:
While this is not a huge deal with two records, I'd hate for a batch of 200 SObjects to fail to insert because one of them had an invalid type. Is this something I need to change in my table setup, or should I check all datatypes before calling create.
I am sending the following array of SObjects to a custom Table in sales force.
Code:
Array ( [0] => SObject Object ( [Id] => [type] => CUST_SALES__c [fields] => Array ( [SALES_CODE__C] => SALE [INVOICE_NO__C] => 1233919 [INVOICE_DATE__C] => 2006-02-10T00:00:00-06:00 [QTY__C] => 19 [PRICE__C] => 19.00 ) ) [1] => SObject Object ( [Id] => [type] => CUST_SALES__c [fields] => Array ( [SALES_CODE__C] => SALE [INVOICE_NO__C] => 1233929 [INVOICE_DATE__C] => 2006-02-11T00:00:00-06:00 [QTY__C] => 29 [PRICE__C] => gggg ) ) )The PRICE__C field in the second object is not a "xsd:double" and should throw an error, but I was hoping that it would insert the first record and return an error on the second record. Instead it just throws an exception and inserts nothing.
While this is not a huge deal with two records, I'd hate for a batch of 200 SObjects to fail to insert because one of them had an invalid type. Is this something I need to change in my table setup, or should I check all datatypes before calling create.
Message Edited by ch9dev on 04-05-2006 10:12 AM
Tran Man
Since the type is incorrect, the SOAP request is invalid and will not be processed.