Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.

SaveResult

The create() call returns an array of SaveResult objects.

Each element in the SaveResult array corresponds to the sObject[] array passed as the sObjects parameter in the create() call. For example, the object returned in the first index in the SaveResult array matches the object specified in the first index of the sObject[] array.

A SaveResult object has these properties.

Name Type Description
id ID ID of the sObject that you attempted to create(). If this field contains a value, then the object was created successfully. If this field is empty, then the object wasn’t created and the API returned error information instead.
success boolean Indicates whether the create() call succeeded (true) or not (false) for this object.
errors Error[] If an error occurred during the create() call, an array of one or more Error objects providing the error code and description.

If your organization has active duplicate rules and a duplicate is detected, the SaveResult includes an Error with a data type of DuplicateError.