
1 answer
Hi Eduardo,
If you're using the Salesforce PHP Toolkit, you can control this with the SOAP API AllOrNoneHeader.
By default, the API can roll back the entire create() operation when one or more records fail. If you want successful records to be committed while only the failed records are returned as errors, set allOrNone to false.
For example, depending on the PHP Toolkit version, the call is typically along these lines:
$result = $client->create($records, array('AllOrNoneHeader' => array('allOrNone' => false)));
The exact method signature can vary between PHP Toolkit versions, so check the generated SforceClient method for API v20.
If you want the whole batch to succeed or fail together, leave allOrNone as true.