UpsertResult

The upsert call returns an array of UpsertResult objects. Each element in the array corresponds to the sObject[] array passed as the sObjects parameter in the upsert() call. For example, the object returned in the first index in the UpsertResult array matches the object specified in the first index of the sObject[] array.

An UpsertResult object has the following properties:

Name Type Description
created boolean Indicates whether the record was created (true) or updated (false).
errors Error[] If errors occurred during the call, an array Error objects, providing the error code and description, is returned.
id ID If the call succeeded, the field contains the ID of the record that was either updated or created. If there was an error, the field is null. For more information, see ID Field Type.
success boolean Indicates whether the call succeeded (true) or not (false) for this object.
© Copyright 2000-2008 salesforce.com, inc. All rights reserved.
Various trademarks held by their respective owners.