You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: website/docs/result.md
+54-2Lines changed: 54 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,11 +4,15 @@ outline: deep
4
4
5
5
# Result
6
6
7
-
The DML library provides comprehensive result handling through the `Result`, `OperationResult`, `RecordResult`, and `Error` interfaces. These allow you to inspect the outcome of DML operations, including success/failure status, record IDs, and error details.
7
+
The DML library provides comprehensive result handling through the [`Result`](#result-interface), [`OperationResult`](#operationresult-interface), [`RecordResult`](#recordresult-interface), and [`Error`](#error-interface) interfaces. These allow you to inspect the outcome of DML operations, including success/failure status, record IDs, and error details.
8
8
9
9
## Overview
10
10
11
-
When you call `commitWork()` or `dryRun()`, a `Result` object is returned containing detailed information about each DML operation performed.
11
+
When you call `commitWork()`, `commitTransaction()` or `dryRun()`, a `Result` object is returned containing detailed information about each DML operation performed.
12
+
13
+
::: info
14
+
`Result` is returned only when **no errors occur** or `allowPartialSuccess()` is enabled. Otherwise, a `DmlException` will be thrown, which mimcs standard DML behaviour.
0 commit comments