An array of Database.UpsertResult objects is returned with the upsert database method. Each element in the UpsertResult array corresponds to the sObject array passed as the sObject[] parameter in the upsert Database method; that is, the first element in the UpsertResult array matches the first element passed in the sObject array, the second element corresponds with the second element, and so on. If only one sObject is passed in, the UpsertResults array contains a single element.
The following are methods for UpsertResult. All are instance methods.
public Database.Error[] getErrors()
Type: Database.Error []
public ID getId()
Type: ID
If this field contains a value, the object was successfully updated or inserted. If this field is empty, the operation was not successful for that object.
public Boolean isCreated()
Type: Boolean
public Boolean isSuccess()
Type: Boolean